Ericsson / papyrus-patches

A number of feature patches for Eclipse Papyrus fixing the Sequence diagrams
Eclipse Public License 2.0
1 stars 0 forks source link

Message nudge and move does not stick to grid properly, if enabled #21

Closed acampesino closed 5 years ago

acampesino commented 5 years ago

When moving or nudging a message, the first request is triggered in the tool for the mouseMove of the drag operation. That event is the first one reported and we take the mouse position as the click position and calculate the delta from that point to the current position. This is wrong as we missed several pixels in each direction (the ones that are used to differenciate a click from a drag.)

We need to do as: 1) Calculate delta 2) Apply delta to original. 3) Snap results to grid 4) Calculate new Delta based on it.