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

Fix sometimes unable to keyboard-move group to left/up

This commit is contained in:
Nick O'Leary 2020-06-17 09:57:25 +01:00
parent aca379db6e
commit 4469a334fd
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -102,11 +102,13 @@ RED.view.tools = (function() {
node.n.dirty = true;
if (node.n.type === "group") {
RED.group.markDirty(node.n);
minX = Math.min(node.n.x - 5,minX);
minY = Math.min(node.n.y - 5,minY);
} else {
minX = Math.min(node.n.x-node.n.w/2-5,minX);
minY = Math.min(node.n.y-node.n.h/2-5,minY);
}
minX = Math.min(node.n.x-node.n.w/2-5,minX);
minY = Math.min(node.n.y-node.n.h/2-5,minY);
}
if (minX !== 0 || minY !== 0) {
for (var n = 0; n<moving_set.length; n++) {
node = moving_set[n];