]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.diagram/src/org/simantics/diagram/elements/TextGridNode.java
Allow customisation of drag behaviour in TextGridNode
[simantics/platform.git] / bundles / org.simantics.diagram / src / org / simantics / diagram / elements / TextGridNode.java
index 20d419ef089cb4690046de362a14755d258881e4..3b8de909280becba65a9c80090d203f3381d0aa7 100644 (file)
@@ -294,7 +294,7 @@ public class TextGridNode extends G2DParentNode implements Decoration {
         return EventTypes.MouseDragBeginMask | EventTypes.MouseMovedMask | EventTypes.MouseButtonReleasedMask | EventTypes.KeyPressedMask;
     }
     
-    private static boolean isEventDummy(MouseDragBegin e) {
+    protected static boolean isEventDummy(MouseDragBegin e) {
        if (e.controlPosition.distance(0, 0) == 0 
                        && e.screenPosition.distance(0, 0) == 0
                        && e.buttons == 0) {
@@ -304,9 +304,9 @@ public class TextGridNode extends G2DParentNode implements Decoration {
        }
     }
     
-    private boolean dragging = false;
-    private Point2D dragBegin = null;
-    private Point2D currentDrag = null;
+    protected boolean dragging = false;
+    protected Point2D dragBegin = null;
+    protected Point2D currentDrag = null;
     private Function1<Vec2d, Boolean> translator = null;
     
     private static double FACTOR = 1.0;