Resizing and Rotating customization

Is it possible to customize the resizing and rotating tool to snap to integer values.

I think using the snapAngle attributes in rotating tool I can get something done there. Could not find anything similar in the resizing tool?

My example use case is - I don’t want shapes to have a height of say 90.1253246436. When resizing I want it to jump from 90 to 91. Same in case of rotation from angle 90 to 91.

Any samples that handle this kind of use cases?

For rotation, set RotatingTool.snapAngleMultiple to 1.0 and RotatingTool.snapAngleEpsilon to 0.5.

For resizing, set ResizingTool.cellSize to new go.Size(1, 1).

1 Like