You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In brief, I'm using JS to reposition and rotate an element incrementally over time, and want the element to rotate about its natural center and reposition relative to its original position. If I do this using the .request calls in this order, the location is shifted relative to the rotated element. (mv is the moveable instance)
newAngle increases over time
newX and newY change over time
However, the position seems to shift after several iterations. This happens even if the newX and newY remain static. Simply calling the draggable request seems to introduce some calculation errors internally over time.
Has anyone seen this or is there a better way to implement these actions?
The text was updated successfully, but these errors were encountered:
In brief, I'm using JS to reposition and rotate an element incrementally over time, and want the element to rotate about its natural center and reposition relative to its original position. If I do this using the .request calls in this order, the location is shifted relative to the rotated element. (mv is the moveable instance)
newAngle increases over time
newX and newY change over time
If I reverse the operations, it also results in the incorrect position.
I've found that I can effectively separate these operations by resetting rotation to zero, set the new position, then apply the new rotation.
However, the position seems to shift after several iterations. This happens even if the newX and newY remain static. Simply calling the draggable request seems to introduce some calculation errors internally over time.
Has anyone seen this or is there a better way to implement these actions?
The text was updated successfully, but these errors were encountered: