You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when snap-to-grid is active, all items are snapped to their center position. For node item this is fine, as the links are starting at the center of the node. So even with differently sized nodes it is easy to position them in a way, that the links are horizontally or vertically aligned.
But for the other item types the center is nothing special, the user is more interested in the position of an edge. I'm always irritated, that the item position slightly changes, when I resize it. So I suggest to snap drawing items to the upper left edge. Maybe the circle/elliptic item could be an exception, but I won't implement a special case just for that.
But this will slightly change the position of drawing items of existing projects (when snap-to-grid is active). Therefore I won't change that in v2.2.
Describe the solution you'd like
I suggest to change the snap-to-gid part in gns3/items/drawing_item.py so, that it snaps to the upper left edge:
if change == QtWidgets.QGraphicsItem.ItemPositionChange and self._main_window.uiSnapToGridAction.isChecked():
grid_size = self._graphics_view.drawingGridSize()
value.setX(grid_size * round(value.x() / grid_size))
value.setY(grid_size * round(value.y() / grid_size))
The text was updated successfully, but these errors were encountered:
Currently, when snap-to-grid is active, all items are snapped to their center position. For node item this is fine, as the links are starting at the center of the node. So even with differently sized nodes it is easy to position them in a way, that the links are horizontally or vertically aligned.
But for the other item types the center is nothing special, the user is more interested in the position of an edge. I'm always irritated, that the item position slightly changes, when I resize it. So I suggest to snap drawing items to the upper left edge. Maybe the circle/elliptic item could be an exception, but I won't implement a special case just for that.
But this will slightly change the position of drawing items of existing projects (when snap-to-grid is active). Therefore I won't change that in v2.2.
Describe the solution you'd like
I suggest to change the snap-to-gid part in gns3/items/drawing_item.py so, that it snaps to the upper left edge:
The text was updated successfully, but these errors were encountered: