Camunda-modeler: Wrong snap lines are shown on paste

Created on 27 Nov 2019  路  4Comments  路  Source: camunda/camunda-modeler

__Describe the Bug__

When multi-element pasting wrong/confusing snap lines are shown to the user:

capture nLAPKq_optimized

__Steps to Reproduce__

  1. Open test diagram
  2. Copy all elements
  3. Start two-step pasting
  4. See snap lines being shown relative to coordinate origin _?_ under certain circumstances

__Expected Behavior__

Snap lines are not shown at all _or_ show next to the diagram.

__Environment__

  • OS: Any
  • Camunda Modeler Version: v3.4.1, v3.5.0
bug

All 4 comments

Oh no. 馃槩

I thought we fixed this one but apparently we did not.

By having a first look, the problem seems to be that we make a calculation error when setting snap origins for connections inside BpmnCreateMoveSnapping (docking).

In the buggy example file:

An origin point set for the connection -> (-428, -221)
An origin point set for the shape mid point -> (20, -10)

These numbers don't make much sense as the connection and the mid point share the same Y coordinate.

I think the solution is to do the same thing that CreateMoveSnapping in diagram-js does, which is to substract the event coordinates from the actual coordinates only if we are moving the shape but not creating it. The solution should be applied to here and here.

Was this page helpful?
0 / 5 - 0 ratings