private static final Font FONT = new Font(Font.SANS_SERIF, Font.PLAIN, DPIUtil.upscale(10));
- private static final Point2D UNIT_X = new Point2D.Double(1.0, 0.0);
-
public static final String NODE_KEY = "DISTRICT_NETWORK_STATIC_INFO";
String info = null;
Point2D origin = new Point2D.Double();
- Point2D direction = UNIT_X;
+ Point2D direction = new Point2D.Double();
private DistrictNetworkEdgeNode edgeNode = null;
}
public void setLocation(Point2D origin, Point2D direction) {
- this.origin = origin;
- this.direction = direction;
+ this.origin.setLocation(origin);
+ this.direction.setLocation(direction);
}
public void setInfo(String info) {
public void setEdgeNode(DistrictNetworkEdgeNode n) {
this.edgeNode = n;
+ // Ensure that origin/location are recalculated
+ prevZoomLevel = -1;
}
}