html5 canvas - Kineticjs Stage Cordinates after scaling -


i'm using kineticjs allow users free hand drawing shapes on canvas , able zoom in/out canvas stage setting scale.

challenge:

am not getting updated scaled coordinates values after zoom in/out. suggestion appreciated.

as far know, coordinates don't scaled, because thing changing 'setscale()' method zoom.

so, if want know tne coordinates in scaled stage have store scale amount in variable , when need coordinate after scaling, multiply original shape coordinate scale of stage.

this approach, not sure if there other way ;)


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -