Yup - it'll be present in the next nightly build.
Announcement
Collapse
No announcement yet.
X
-
Originally posted by csillagWorks great.
I see two problems with the called onMoveHandlers:
1. The coordinates passed in with the event are not relative to the Canvas's parent, but refer to some outer frame (probably browser window). This might not be an error thought; but not what I have expected. (My guess was that since we are catching movements caused by explicit move requests, the coordinates will be the local top and left coordinates.) This is not a real issue though; I can easily call getTop() and getLeft() on the moved Canvas to get these coordinates.
2. When several objects are moving simultaneously (for example, there are several pending animations), the passed event's getX and getY values contain wrong values. (All moving Canvases get notified with the same, wrong values, even though they are moving in totally different positions.)
This is 100% reproducable, so I would like to avoid creating sample code for this, if possible.
Again, this is not a big issue, because I can just call getTop() and getLeft() on all the moved objects to get their real position.
* * *
I just wanted to tell you about these; since there are easy workarounds, I can proceed in this area without further assistance.
Thank you again:
Csillag
Comment
-
Wait - are you calling MovedEvent.getX() or MovedEvent.getDeltaX()?
MovedEvent.getX() is available on all browser events and gives you the current coordinates of the mouse.
MovedEvent.getDeltaX() should give you the delta between current and previous position. So you should be able to use getDeltaX() to see how far the component moved horizontally, or just component.getLeft() to get its current position.
Comment
Comment