prmr / JetUML

A desktop application for fast UML diagramming.
GNU General Public License v3.0
625 stars 125 forks source link

Snapping Node Dimensions to Grid, except when Moving #431

Open prmr opened 3 years ago

prmr commented 3 years ago

Currently, the position of the nodes is snapped to the grid, but their dimensions (width and height) are not.

image

It might be interesting to find a way to snap the dimensions of the nodes to the grid as well. However, this can be tricky, because simply snapping the diagram elements' bounds in the viewer creates an undesirable "jitter" effect when moving the nodes. For a really smooth experience, the nodes' view should not be snapped when moving them.

One design idea is to snap the bounding box to the grid multiple while moving. This will naturally snap to grid once the position is snapped to grid.