Reputation: 49
When stage's scale is 1 - Transformer's handles draw normal (image 1), but when stage is scaled - Transformer's handles visually scales with stage (image 2). Is it a method to prevent such a behaviour?
Stage scale is 0.5
Upvotes: 0
Views: 1046
Reputation: 20373
If you updated scale of the parent node (stage) AFTER you created transformer try to update it:
transformer.forceUpdate()
Demo: http://jsbin.com/vigedihopo/edit?html,js,output
Also, you may add all shape into a Konva.Group
and scale it instead of Konva.Stage
. So Konva.Transformer
will be placed inside not scaled container.
Upvotes: 2