@@ -133,7 +133,7 @@ public SmartGraphEdgeNode(Edge<E, V> edge, SmartGraphVertexNode<V> inbound, Smar
133133 this .endXProperty ().bind (inbound .centerXProperty ());
134134 this .endYProperty ().bind (inbound .centerYProperty ());
135135
136- // Initial placement of control points for the curve/line
136+ // Initial placement of control points for the curve/line.
137137 update ();
138138
139139 enableListeners ();
@@ -151,6 +151,7 @@ public void setMultiplicityIndex(int multiplicityIndex) {
151151
152152 this .multiplicityIndex = multiplicityIndex ;
153153
154+ // Changing the multiplicity will change the curve of the edge, so update the control points.
154155 update ();
155156 }
156157
@@ -436,27 +437,6 @@ public void attachArrow(SmartArrow arrow) {
436437 arrow .getTransforms ().add (pullbackTranslation );
437438 }
438439
439- /*public void attachArrow(SmartArrow arrow) {
440- this.attachedArrow = arrow;
441-
442- arrow.translateXProperty().bind(endXProperty());
443- arrow.translateYProperty().bind(endYProperty());
444-
445- Rotate rotation = new Rotate();
446- rotation.setPivotX(0); // Arrow tip is at its local (0,0)
447- rotation.setPivotY(0);
448- rotation.angleProperty().bind(UtilitiesBindings.toDegrees(
449- UtilitiesBindings.atan2(endYProperty().subtract(controlY2Property()),
450- endXProperty().subtract(controlX2Property()))
451- ));
452-
453- arrow.getTransforms().add(rotation);
454-
455- Translate pullbackTranslation = new Translate();
456- pullbackTranslation.xProperty().bind(inbound.radiusProperty().negate());
457- arrow.getTransforms().add(pullbackTranslation);
458- }*/
459-
460440 @ Override
461441 public SmartArrow getAttachedArrow () {
462442 return this .attachedArrow ;
0 commit comments