'Snap-to-grid' functionality

John

I need to organize my diagram in a way that each time I drop a shape or draw a connection, it is lined up properly.
Also is there a way to increase the movement's step of a given shape in order to make the dropped shapes organized in a better way?

Thanks in advance.

Daniel

There is a snap.size option that can be used to change the step but it seems that it is missing from the documentation. We will document it as soon as possible.
Snap to grid functionality is not currently available although it is partially incorporated in the code and could be implemented by using approach similar to the one in this example.

Daniel

Indeed, you are right. The elements are removed by index and an incorrect element will be removed when when inserting an additional element to the shapes group. You can avoid the problem by inserting the grid in root group:

diagram.canvas.drawingElement.insertAt(grid, 0);

In this case you will also need to scale the grid when the diagram is zoomed e.g.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.