camunda / camunda-modeler

An integrated modeling solution for BPMN, DMN and Forms based on bpmn.io.
https://camunda.com/products/modeler
MIT License
1.49k stars 476 forks source link

Basic Snap-to-Grid #1019

Closed PwrSrg closed 5 years ago

PwrSrg commented 5 years ago

Describe the feature you'd like to see

Can we please get even basic Snap-to-Grid functionality?

Context

Checkout this comment for the actual rational + example where this may be useful.

philippfromme commented 5 years ago

+1 I might provide this as a plugin in the meantime.

nikku commented 5 years ago

May I ask why you'd like such functionality? What will it help you with? Should it be configurable? Which alternatives did you consider to this feature request that may help to achieve the same goal?

nikku commented 5 years ago

@PwrSrg :ping_pong:

rvaneerd commented 5 years ago

+1 for me too. Although (or maybe because of) I'm using the modeler for now for only "Documenting" purposes, having some kind of feature to properly align nodes / keep nodes with equal distance, will improve the overal view of the processes.

Regards, Rob.

ps. I know about the alignment (#1056) and distribution (#1057) tools, but they dont work as expected and I've raised the mentioned separate feature requests for them.

nikku commented 5 years ago

Which part of the element should snap to grid exactly? The element middle? Any / all corners?

rvaneerd commented 5 years ago

Which part of the element should snap to grid exactly? The element middle? Any / all corners?

IMHO, when it comes to the elements, the middle would be sufficient. As long as we can position the elements properly. When it comes to connecting the elements through routes, I would prefer more "anchor-points" on the element-sides. Would this all not be depending on the size of the grid?

Regards, Rob.

nikku commented 5 years ago

IMHO, when it comes to the elements, the middle would be sufficient. As long as we can position the elements properly.

We already offer snap lines on various angles. These should help you to position elements sufficiently. What is the additional benefit of the grid compared to snap lines? To be honest I was not able to grasp this one yet.

It "being available in this other tool" is not sufficient as an argument in my opinion.

rvaneerd commented 5 years ago

The Snap lines only work with objects that already have a vertical / horizontal reference. However when objects are placed "in the open" that's where "snap to grid" would be of use: image Hope this helps.

Regards, Rob.

nikku commented 5 years ago

Thanks for the clarification.

I can definitely see that as an extension we provide (and eventually merge into the core tool).

philippfromme commented 5 years ago

Work is happening on the following branches:

The following things are left to do:

nikku commented 5 years ago

Closed via https://github.com/camunda/camunda-modeler/pull/1404.

philippfromme commented 5 years ago

🔥 🔥 🔥 🔥 🔥