AnsweredAssumed Answered

Activiti Designer: Question concerning SequenceFlowShapeController

Question asked by sebastianb on Feb 16, 2015
Dear Developers,

I've got following proble with the designer: ( ACT-2193 )

When an edge-label has an negative x-coordinate, it is positioned relative to the edge, instead of relative to the plane's origin.
I assume I#ve already found the responsible part of the code within the "SequenceFlowShapeController"(Starting at Line 238).

[java title="org.activiti.designer.controller.SequenceFlowShapeController"]
int labelX = (int) labelLocation.getX();
int labelY = (int) labelLocation.getY();
if (labelLocation.getX() > 10) {
  labelX = (int) (labelLocation.getX() - startFlowLocation.getX());
  labelY = (int) (labelLocation.getY() - startFlowLocation.getY());

Here the Position of the label is shifted by the position of the startFlowLocation, resulting in the position relative to the plane's origin.
But I don't understand why this is only done when the x-coordinate of the label is greater than 10. Omitting the if-clause seems to fix the issue, but as long as I don't understand why its there in the first place, that isn't satisfying.