Skip to content

Commit

Permalink
[443954] Ensure interpolator uses updated start and end points.
Browse files Browse the repository at this point in the history
- Ensured interpolator does not skip in case of empty geometry and
updates decorations based on computed geometry.
  • Loading branch information
nyssen committed May 18, 2016
1 parent 0d3db91 commit 5e5c74e
Showing 1 changed file with 4 additions and 6 deletions.
Expand Up @@ -186,24 +186,22 @@ public void interpolate(Connection connection) {
if (curveNode instanceof GeometryNode
&& !newGeometry.equals(curveNode.getGeometry())) {
// TODO: we need to prevent positions are re-calculated as a
// result
// of the changed geometry. -> the static anchors should not
// update
// their positions because of layout bounds changes.
// result of the changed geometry. -> the static anchors should not
// update their positions because of layout bounds changes.
// System.out.println("New geometry: " + newGeometry);
curveNode.setGeometry(newGeometry);
}

Node startDecoration = connection.getStartDecoration();
if (startDecoration != null) {
arrangeStartDecoration(startDecoration, newGeometry,
connection.getStartPoint());
newGeometry.getP1());
}

Node endDecoration = connection.getEndDecoration();
if (endDecoration != null) {
arrangeEndDecoration(endDecoration, newGeometry,
connection.getEndPoint());
newGeometry.getP2());
}

if (!newGeometry.getBounds().isEmpty()
Expand Down

0 comments on commit 5e5c74e

Please sign in to comment.