\r
import org.simantics.scenegraph.ISelectionPainterNode;\r
import org.simantics.scenegraph.g2d.G2DNode;\r
+import org.simantics.scenegraph.g2d.events.ISGMouseEvent;\r
import org.simantics.scenegraph.utils.NodeUtil;\r
import org.simantics.utils.datastructures.Pair;\r
\r
boolean pressHit = false;\r
\r
private boolean hitTest(MouseEvent event, double tolerance) {\r
- Point2D mp = NodeUtil.sgEventLocations.get(event);\r
- if(mp != null) {\r
+ if(event instanceof ISGMouseEvent) {\r
if(beginBounds == null || endBounds == null) return false;\r
\r
- return Arcs.hitTest(beginBounds, endBounds, angle, mp.getX(), mp.getY(), tolerance);\r
+ return Arcs.hitTest(beginBounds, endBounds, angle, ((ISGMouseEvent)event).getDoubleX(), ((ISGMouseEvent)event).getDoubleY(), tolerance);\r
} else {\r
return false;\r
}\r
\r
@Override\r
public void mouseDragged(MouseEvent e) {\r
- Point2D mp = NodeUtil.sgEventLocations.get(e);\r
- if(pressHit && mp != null) {\r
+ if(pressHit && e instanceof ISGMouseEvent) {\r
setAngle(Arcs.angleOfArc(\r
beginBounds.getCenterX(), beginBounds.getCenterY(), \r
- mp.getX(), mp.getY(), \r
+ ((ISGMouseEvent)e).getDoubleX(), ((ISGMouseEvent)e).getDoubleY(), \r
endBounds.getCenterX(), endBounds.getCenterY()));\r
}\r
}\r