mirror of https://github.com/apache/nifi.git
NIFI-143:
- Using the datum from the appropriate selection. - Handling group selection.
This commit is contained in:
parent
a94cf4be4b
commit
15d7031ebd
|
@ -164,12 +164,15 @@ nf.ProcessGroup = (function () {
|
||||||
var targetData = target.datum();
|
var targetData = target.datum();
|
||||||
|
|
||||||
// see if there is a selection being dragged
|
// see if there is a selection being dragged
|
||||||
var selection = d3.select('rect.drag-selection');
|
var drag = d3.select('rect.drag-selection');
|
||||||
if (!selection.empty()) {
|
if (!drag.empty()) {
|
||||||
var selectionData = selection.datum();
|
// filter the current selection by this group
|
||||||
|
var selection = nf.CanvasUtils.getSelection().filter(function(d) {
|
||||||
|
return targetData.component.id === d.component.id;
|
||||||
|
});
|
||||||
|
|
||||||
// ensure what is being dragged isn't the target
|
// ensure this group isn't in the selection
|
||||||
if (targetData.component.id !== selectionData.component.id) {
|
if (selection.empty()) {
|
||||||
// mark that we are hovering over a drop area if appropriate
|
// mark that we are hovering over a drop area if appropriate
|
||||||
target.classed('drop', function () {
|
target.classed('drop', function () {
|
||||||
// get the current selection and ensure its disconnected
|
// get the current selection and ensure its disconnected
|
||||||
|
|
Loading…
Reference in New Issue