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:
parent
fa4006619e
commit
27cbaac343
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user