From f95a2851c899379d2bf730da62441b43c259bfef Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Mon, 25 Jun 2018 13:36:58 +0100 Subject: [PATCH] Ignore middle-click on node/ports to enable panning --- editor/js/ui/view.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/editor/js/ui/view.js b/editor/js/ui/view.js index 0945a7cd9..129817285 100644 --- a/editor/js/ui/view.js +++ b/editor/js/ui/view.js @@ -1484,6 +1484,10 @@ RED.view = (function() { //console.log(d,portType,portIndex); // disable zoom //vis.call(d3.behavior.zoom().on("zoom"), null); + if (d3.event.button === 1) { + return; + } + mousedown_node = d; mousedown_port_type = portType; mousedown_port_index = portIndex || 0; @@ -1715,6 +1719,9 @@ RED.view = (function() { function nodeMouseDown(d) { focusView(); + if (d3.event.button === 1) { + return; + } //var touch0 = d3.event; //var pos = [touch0.pageX,touch0.pageY]; //RED.touch.radialMenu.show(d3.select(this),pos);