mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
[groups] getGroupAt should return top most group
This commit is contained in:
parent
f61c137ea3
commit
768aa4ac92
@ -2939,44 +2939,10 @@ if (DEBUG_EVENTS) { console.warn("nodeMouseDown", mouse_mode,d); }
|
||||
if (ids.length === 0) {
|
||||
return null;
|
||||
} else {
|
||||
return candidateGroups[ids[0]]
|
||||
return candidateGroups[ids[ids.length-1]]
|
||||
}
|
||||
}
|
||||
|
||||
// function groupHandleMouseDown(group, groupEl, handle,handleIndex) {
|
||||
// d3.event.stopPropagation();
|
||||
// console.log("GHANDLE MD");
|
||||
// if (d3.event.button != 2) {
|
||||
// mousedown_group = group;
|
||||
// group.activeHandle = handleIndex;
|
||||
// var mouse = d3.touches(handle.parentNode.parentNode)[0]||d3.mouse(handle.parentNode.parentNode);
|
||||
// switch(handleIndex) {
|
||||
// case 0: group.ox = group.pos.x0; group.oy = group.pos.y0; break;
|
||||
// case 1: group.ox = group.pos.x1; group.oy = group.pos.y0; break;
|
||||
// case 2: group.ox = group.pos.x1; group.oy = group.pos.y1; break;
|
||||
// case 3: group.ox = group.pos.x0; group.oy = group.pos.y1; break;
|
||||
// }
|
||||
// group.dx = group.ox - mouse[0];
|
||||
// group.dy = group.oy - mouse[1];
|
||||
// console.log("START",group.ox, group.oy);
|
||||
// mouse_offset = d3.mouse(document.body);
|
||||
// if (isNaN(mouse_offset[0])) {
|
||||
// mouse_offset = d3.touches(document.body)[0];
|
||||
// }
|
||||
// mouse_mode = RED.state.GROUP_RESIZE;
|
||||
// }
|
||||
// }
|
||||
// function groupHandleMouseUp(group,groupEl,handle,handleIndex) {
|
||||
// console.log("GHANDLE MU");
|
||||
// d3.event.stopPropagation();
|
||||
// delete group.ox;
|
||||
// delete group.oy;
|
||||
// delete group.dx;
|
||||
// delete group.dy;
|
||||
// resetMouseVars();
|
||||
// mouse_mode = RED.state.DEFAULT;
|
||||
// }
|
||||
|
||||
function isButtonEnabled(d) {
|
||||
var buttonEnabled = true;
|
||||
var ws = RED.nodes.workspace(RED.workspaces.active());
|
||||
@ -4597,7 +4563,6 @@ if (DEBUG_EVENTS) { console.warn("nodeMouseDown", mouse_mode,d); }
|
||||
mouse_mode = RED.state.SELECTING_NODE;
|
||||
clearSelection();
|
||||
if (options.selected) {
|
||||
console.log(options.selected);
|
||||
options.selected.forEach(function(id) {
|
||||
var n = RED.nodes.node(id);
|
||||
if (n) {
|
||||
|
@ -104,7 +104,9 @@
|
||||
fill-opacity: 1;
|
||||
stroke-width: 2;
|
||||
}
|
||||
.red-ui-flow-group-label {}
|
||||
.red-ui-flow-group-label {
|
||||
@include disable-selection;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user