1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Restore shift-drag to snap/unsnap to grid

This commit is contained in:
Nick O'Leary 2016-01-13 09:16:24 +00:00
parent fa4006619e
commit 27cbaac343

View File

@ -614,7 +614,7 @@ RED.view = (function() {
node.n.y -= minY; node.n.y -= minY;
} }
} }
if (snapGrid && moving_set.length > 0) { if (snapGrid != d3.event.shiftKey && moving_set.length > 0) {
var gridOffset = [0,0]; var gridOffset = [0,0];
node = moving_set[0]; node = moving_set[0];
gridOffset[0] = node.n.x-(gridSize*Math.floor((node.n.x-node.n.w/2)/gridSize)+node.n.w/2); gridOffset[0] = node.n.x-(gridSize*Math.floor((node.n.x-node.n.w/2)/gridSize)+node.n.w/2);