public SetNodeValuesTool(Node node, Trajectory trajectory, int newX, int newY, float newScale) { this.newX = newX; this.newY = newY; this.newScale = newScale; this.oldX = node.getX(); this.oldY = node.getY(); this.oldScale = node.getScale(); this.node = node; this.trajectory = trajectory; this.oldLengths = new Dictionary <string, float>(); }
public SetNodeValuesTool(Node node, Trajectory trajectory, int newX, int newY, float newScale) { this.newX = newX; this.newY = newY; this.newScale = newScale; this.oldX = node.getX(); this.oldY = node.getY(); this.oldScale = node.getScale(); this.oldLength = new Dictionary <string, float>(); bool isEnd; foreach (Trajectory.Side side in trajectory.getSides()) { isEnd = side.getIDEnd().Equals(node.getID()); if (isEnd || side.getIDStart().Equals(node.getID())) { oldLength.Add(isEnd ? side.getIDStart() : side.getIDEnd(), side.getLength()); } } this.node = node; this.trajectory = trajectory; }