import org.simantics.g2d.canvas.impl.SGNodeReflection.SGCleanup;
import org.simantics.g2d.canvas.impl.SGNodeReflection.SGInit;
import org.simantics.maps.sg.MapNode;
+import org.simantics.maps.sg.MapScaleNode;
import org.simantics.scenegraph.g2d.G2DParentNode;
import org.simantics.scenegraph.g2d.events.EventHandlerReflection.EventHandler;
import org.simantics.scenegraph.g2d.events.command.CommandEvent;
};
protected MapNode node = null;
+ protected MapScaleNode scaleNode = null;
private int scale;
node.setScale(scale);
node.setEnabled(true);
node.setZIndex(Integer.MIN_VALUE + 999); // Just under the grid
+
+ scaleNode = parent.addNode("mapScale", MapScaleNode.class);
+ scaleNode.setScale(scale);
+ scaleNode.setEnabled(true);
+ scaleNode.setZIndex(Integer.MAX_VALUE - 999); // Just under the grid
}
@SGCleanup