adamRenny / LayerJS

2D Canvas Library supporting Layered Rendering
MIT License
8 stars 1 forks source link

CenterPoint Scaled X & Y are inaccurate #63

Closed adamRenny closed 11 years ago

adamRenny commented 11 years ago

When a Renderable is scaled from any non-origin point, the x and y positions will become inaccurate.

The x and y positions should update as an element is scaled.

aaronholsonege commented 11 years ago

Added Renderable.unscaledX and Renderable.unscaledY to work like Renderable.unscaledWidth and Renderable.unscaledHeight.

Renderable.unscaledX and Renderable.unscaledY are the pre-scale coordinates, and Renderable.x and Renderable.y are the post-scale coordinates.

Now to update the coordinates of a Renderable, unscaledX and unscaledY must be set.

50772461d7d0d7eea68df7babad0923f9e1a1990 ff99e66e056e935fa1f589d90c7816d2ade64beb

aaronholsonege commented 11 years ago

Ready for merge: https://github.com/adamRenny/LayerJS/tree/feature/%2363

adamRenny commented 11 years ago

Merged - intent is to find a different fix, but this will do for now. bf82285975d30fd46f07fdc086420148a328b442