From: Antti Villberg Date: Tue, 9 Jun 2020 13:38:22 +0000 (+0300) Subject: Allow customisation of drag behaviour in TextGridNode X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=af846964eb7026941c0336ec4029eff09806f537;p=simantics%2Fplatform.git Allow customisation of drag behaviour in TextGridNode Change-Id: I814e9f35ceb34302e4a45c0f9223cbf9e98593a7 --- diff --git a/bundles/org.simantics.diagram/src/org/simantics/diagram/elements/TextGridNode.java b/bundles/org.simantics.diagram/src/org/simantics/diagram/elements/TextGridNode.java index 20d419ef0..3b8de9092 100644 --- a/bundles/org.simantics.diagram/src/org/simantics/diagram/elements/TextGridNode.java +++ b/bundles/org.simantics.diagram/src/org/simantics/diagram/elements/TextGridNode.java @@ -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 translator = null; private static double FACTOR = 1.0;