Skip to content

Commit

Permalink
Fix group selection when using lasso
Browse files Browse the repository at this point in the history
  • Loading branch information
knolleary committed Mar 20, 2023
1 parent 586006d commit b56bd7b
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions packages/node_modules/@node-red/editor-client/src/js/ui/view.js
Expand Up @@ -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;
})();
Expand Down Expand Up @@ -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))
}
}
})
Expand Down

0 comments on commit b56bd7b

Please sign in to comment.