moveTo animation and on 'move' or 'drag' event

500 views
Skip to first unread message

seth

unread,
Jan 30, 2013, 2:49:38 PM1/30/13
to jsxg...@googlegroups.com
Howdy folks:

I have a point that has an el.on("drag"....) function that is working
when i animate the point with el.moveTo(...) function that is working,
but the el.moveTo(..) does not change what is changed when the el.on("drag".. ) function changes.
I have tried using el.on("move"...) and el.on("mousemove"...)
and the el.moveTo(...) still does not update appropriately.

Am i missing something?
Any ideas ?
Is an example needed?

As usual...
THANKS!!!

seth

michael

unread,
Feb 1, 2013, 3:33:37 AM2/1/13
to jsxg...@googlegroups.com
Hi,

the point events unfortunately all listen to events originating from the end user's mouse or finger. Maybe we should change that. Meanwhile you could use the point's coords object's update event:


No matter where the coordinate change originates from, this is called (almost) every time the coordinates of the point change. This event originates from setCoordinates(), so if you change the coordinates of the point in this handler, make sure you make it manually (by setting the usrCoords/scrCoords array yourself and updating the scrCoords resp. usrCoords via usr2screen resp. screen2usr - this is the only time there will be no update event fire, hence the 'almost' before) and don't use the point's setCoordinates* or moveTo methods.


Michael

Seth Weiss

unread,
Feb 1, 2013, 4:58:38 AM2/1/13
to jsxg...@googlegroups.com, jsxg...@googlegroups.com
Thank YOU!!!

now when kids move endpoints of major and minor axis of ellipse
the no-existant vertical or horizontal ellipse hides itself wonderfully!!!!

seth
Reply all
Reply to author
Forward
0 new messages