In my transformer I am using anchor snapping to line up the sizing anchors with a grid. But the code also executes when I use the rotating anchor.
How can I use the snap-to-grid code but not for the rotation anchor?
The snap to grid demo in the Konva docs uses the following code to recognise the rotation anchor and exit the function before the snapping code runs.
// do not snap rotating point
if (tr.getActiveAnchor() === 'rotater') {
return newPos;
}