Reputation: 179
I'm using react-konva
(Konva) and I need to prevent rotating the shape(rectangle) by clicking on corner point and dragging it over diagonal corner point. That will rotate the rectangle by 180 or -180 deg. Setting rotation=0
works only if you do 180deg rotation, otherwise, the shape is misplaced after you finish dragging.
How can I disable shape transformation and not allow dragging any point over another shape's point?
Upvotes: 1
Views: 516
Reputation: 9535
You need to set flipEnabled to false https://konvajs.org/api/Konva.Transformer.html#flipEnabled__anchor. This is stop the effect you are seeing.
Upvotes: 1