
| Key: |
LPP-4357
|
| Type: |
Bug
|
| Status: |
Closed
|
| Resolution: |
Fixed
|
| Priority: |
P0
|
| Assignee: |
Unassigned
|
| Reporter: |
Arnaldo M
|
| Votes: |
0
|
| Watchers: |
0
|
|
If you were logged in you would be able to see more operations.
|
|
|
| Severity: |
Minor
|
| Fixed in Change#: |
5,773
|
| Fixed in branch: |
branches/legals
|
| Runtime: |
N/A
|
| Fix in hand: |
False
|
|
The method view.getMouse() should return the position of the mouse relative to the view. Although, when compiling the following code to DHTML and running it on Firefox, one can observe that this method returns the position of the mouse relative to the canvas.
<canvas>
<view width="100" height="100" x="400" y="400" bgcolor="0xFFFF00">
<attribute name="mouseX" value="${getMouse('x')}"/>
<attribute name="mouseY" value="${getMouse('y')}"/>
<text text="${parent.mouseX+':'+parent.mouseY}"/>
</view>
</canvas>
|
|
Description
|
The method view.getMouse() should return the position of the mouse relative to the view. Although, when compiling the following code to DHTML and running it on Firefox, one can observe that this method returns the position of the mouse relative to the canvas.
<canvas>
<view width="100" height="100" x="400" y="400" bgcolor="0xFFFF00">
<attribute name="mouseX" value="${getMouse('x')}"/>
<attribute name="mouseY" value="${getMouse('y')}"/>
<text text="${parent.mouseX+':'+parent.mouseY}"/>
</view>
</canvas> |
Show » |
|
Date: 2007-07-24 15:37:23 -0700 (Tue, 24 Jul 2007)
New Revision: 5773
Modified:
openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
Log:
Change 20070724-maxcarlson-8 by maxcarlson@plastik on 2007-07-24 13:09:36 PDT
in /Users/maxcarlson/openlaszlo/legals-checkin
for http://svn.openlaszlo.org/openlaszlo/branches/legals
Summary: Fix sprite position caching during early initiialization
New Features:
Bugs Fixed:
LPP-4357- getMouse returns absolute coordinates in DHTML + FFTechnical Reviewer: promanik
QA Reviewer: jcrowley
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details: LzSprite.js - Only set __poscachedirty if the sprite has a __parent attached. Otherwise, the position will be cached too early - before the sprite is attached to the DOM. This yields a nice speedup and resolves the issue with lpp-4120.
Tests: Tested
LPP-4120,LPP-4357testcases in Safari, Firefox 2 and IE 7.Modified: openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2007-07-24 20:19:10 UTC (rev 5772)
+++ openlaszlo/branches/legals/WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js 2007-07-24 22:37:23 UTC (rev 5773)
@@ -1269,15 +1269,12 @@
}
}
- /* This breaks in firefox - see
LPP-4120- // set this and parent's dirty to false
+ // set this and parents' __poscachedirty to false
var p = this;
- while (p != this.__rootSprite) {
- p.__poscachedirty = false;
+ while (p && p != this.__rootSprite) {
+ if (p.__parent) p.__poscachedirty = false;
p = p.__parent;
}
- */
- this.__poscachedirty = false;
this.__poscache = pos;
return pos;
}
_______________________________________________
Laszlo-checkins mailing list
Laszlo-checkins@openlaszlo.org
http://www.openlaszlo.org/mailman/listinfo/laszlo-checkins