From 562f580d80a1ed1f2b5fabd3bab520b2fa44c4a8 Mon Sep 17 00:00:00 2001 From: Antti Villberg Date: Tue, 9 Jun 2020 16:38:22 +0300 Subject: [PATCH] Allow customisation of drag behaviour in TextGridNode Change-Id: I814e9f35ceb34302e4a45c0f9223cbf9e98593a7 --- .../src/org/simantics/diagram/elements/TextGridNode.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; -- 2.47.1