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

Fix group selection when using lasso

This commit is contained in:
Nick O'Leary 2023-03-20 17:15:45 +00:00
parent 586006de4d
commit b56bd7bb5e
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9

View File

@ -189,7 +189,13 @@ RED.view = (function() {
set.unshift(...removed)
}
},
find: function(func) { return set.find(func) }
find: function(func) { return set.find(func) },
dump: function () {
console.log('MovingSet Contents')
api.forEach((n, i) => {
console.log(`${i+1}\t${n.n.id}\t${n.n.type}`)
})
}
}
return api;
})();
@ -1920,10 +1926,11 @@ RED.view = (function() {
if (!movingSet.has(n) && !n.selected) {
// group entirely within lasso
if (n.x > x && n.y > y && n.x + n.w < x2 && n.y + n.h < y2) {
n.selected = true
n.dirty = true
var groupNodes = RED.group.getNodes(n,true);
groupNodes.forEach(gn => movingSet.add(gn))
selectGroup(n, true)
// n.selected = true
// n.dirty = true
// var groupNodes = RED.group.getNodes(n,true);
// groupNodes.forEach(gn => movingSet.add(gn))
}
}
})