1

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?

1 Answers1

1

You need to set flipEnabled to false https://konvajs.org/api/Konva.Transformer.html#flipEnabled__anchor. This is stop the effect you are seeing.

Vanquished Wombat
  • 9,075
  • 5
  • 28
  • 67