-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Currently the node creation tool send a ChangeBoundsOperation to the server after a move operation even if the position of the element has not changed.
For example in the workflow example the GridSnapper is bound with a 10x10 Grid. Meaning if a user only moves the element <5 pixels and releases the element will snap back to its original position. However, the tool then still sends an operation to the server resulting in no-op operation that marks the editor as dirty. (see also #1474)
We should implement checks on both sides
- The client should not send a a move/change bounds operation of the position of the element has not changed
- The server should not create and execute a Command if the position is unchanged
- This also includes a refactoring of the
CompoundOperationHandlerwhich should not be executed/create a command if the list of subcommands is empty
- This also includes a refactoring of the
In addition, we should have a look at the operations that we send to the server on a valid move. Currently we send a ChangeBounds and ChangeRoutingPoints operation in a compound command. The question here is why do we need a ChangeRoutingPointsOperation in the first place? Moving an element only moves the source/target points of an edge which are not part of the routing points anyways. IMO the ChangeRoutingPointsOperation is not necessary at all.