fix(planes): use utility
This commit is contained in:
parent
33c3915f85
commit
13192efe0b
|
@ -9,6 +9,7 @@ import { getMid } from 'diagram-js/lib/layout/LayoutUtil';
|
|||
import { getBBox } from 'diagram-js/lib/util/Elements';
|
||||
import {
|
||||
getPlaneIdFromShape,
|
||||
getShapeIdFromPlane,
|
||||
isPlane,
|
||||
toPlaneId
|
||||
} from '../../../util/DrilldownUtil';
|
||||
|
@ -310,12 +311,12 @@ export default function SubProcessPlaneBehavior(
|
|||
return;
|
||||
}
|
||||
|
||||
var id = planeId(element);
|
||||
var id = getPlaneIdFromShape(element);
|
||||
var parent = elementRegistry.get(id);
|
||||
|
||||
if (parent) {
|
||||
|
||||
// Don't copy invisible root element
|
||||
// do not copy invisible root element
|
||||
children.push.apply(children, parent.children);
|
||||
}
|
||||
});
|
||||
|
@ -333,7 +334,8 @@ export default function SubProcessPlaneBehavior(
|
|||
return;
|
||||
}
|
||||
|
||||
var parentId = parent.id.replace(planePostfix, '');
|
||||
var parentId = getShapeIdFromPlane(parent);
|
||||
|
||||
var referencedShape = find(elements, function(element) {
|
||||
return element.id === parentId;
|
||||
});
|
||||
|
@ -381,7 +383,7 @@ SubProcessPlaneBehavior.prototype._moveChildrenToShape = function(source, target
|
|||
return;
|
||||
}
|
||||
|
||||
// Only change plane if there are no visible children, but don't move them
|
||||
// only change plane if there are no visible children, but don't move them
|
||||
var visibleChildren = children.filter(function(child) {
|
||||
return !child.hidden;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue