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
Move rectangle to see coordinates in developer console (move by 1-2 px)
Rotate to see new weird coordinates, (1-2º is enough)
Move again 1-2 px, and new coordinates...
in step #2, the coordinates are set from middle of the rectangle, instead of being from the top left corner as otherwise.
Is this intended behavior, or is it a bug? Anyone else that got a similar issue, and know a workaround? Or should I use anything else than object:modified for capturing info on changed objects (size, angle and coordinates)?
The text was updated successfully, but these errors were encountered:
When you rotate an object around the center you end up setting the origin and coords to be based to the center.
if (t.action === 'rotate') {
this._setOriginToCenter(t.target);
}
else {
...
What ends up feeling wonky is that if you're then moving x/y position it switches back to a top-left origin which is actually the top-left corner before rotation. You get the effect of moving the object to the right and down quite a bit and then rotating around the top-left corner, which wasn't what I was expecting, at least.
To record an object's x, y, scale, rotation in a consistent coordinate space I'm using the getPointByOrigin( ... ) method to always use the center origin.
Hi
http://jsfiddle.net/Walliski/c6mcbtvx/
To reproduce:
in step #2, the coordinates are set from middle of the rectangle, instead of being from the top left corner as otherwise.
Is this intended behavior, or is it a bug? Anyone else that got a similar issue, and know a workaround? Or should I use anything else than object:modified for capturing info on changed objects (size, angle and coordinates)?
The text was updated successfully, but these errors were encountered: