mirror of
				https://github.com/node-red/node-red.git
				synced 2025-03-01 10:36:34 +00:00 
			
		
		
		
	Fix group selection when using lasso
This commit is contained in:
		@@ -189,7 +189,13 @@ RED.view = (function() {
 | 
				
			|||||||
                    set.unshift(...removed)
 | 
					                    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;
 | 
					        return api;
 | 
				
			||||||
    })();
 | 
					    })();
 | 
				
			||||||
@@ -1920,10 +1926,11 @@ RED.view = (function() {
 | 
				
			|||||||
                if (!movingSet.has(n) && !n.selected) {
 | 
					                if (!movingSet.has(n) && !n.selected) {
 | 
				
			||||||
                    // group entirely within lasso
 | 
					                    // group entirely within lasso
 | 
				
			||||||
                    if (n.x > x && n.y > y && n.x + n.w < x2 && n.y + n.h < y2) {
 | 
					                    if (n.x > x && n.y > y && n.x + n.w < x2 && n.y + n.h < y2) {
 | 
				
			||||||
                        n.selected = true
 | 
					                        selectGroup(n, true)
 | 
				
			||||||
                        n.dirty = true
 | 
					                        // n.selected = true
 | 
				
			||||||
                        var groupNodes = RED.group.getNodes(n,true);
 | 
					                        // n.dirty = true
 | 
				
			||||||
                        groupNodes.forEach(gn => movingSet.add(gn))
 | 
					                        // var groupNodes = RED.group.getNodes(n,true);
 | 
				
			||||||
 | 
					                        // groupNodes.forEach(gn => movingSet.add(gn))
 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            })
 | 
					            })
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user