Skip to content

Commit

Permalink
fix: move elements into subprocess after all elements are created
Browse files Browse the repository at this point in the history
  • Loading branch information
jarekdanielak committed Jan 17, 2025
1 parent 569ce9f commit 0a7dd88
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions lib/features/modeling/behavior/SubProcessPlaneBehavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,23 @@ export default function SubProcessPlaneBehavior(
}, true);


this.postExecuted('shape.create', function(context) {
var shape = context.shape,
rootElement = context.newRootElement;
this.postExecuted('elements.create', function(context) {

if (!rootElement || !shape.children) {
return;
}
var elements = context.elements;

elements.forEach(function(element) {

self._showRecursively(shape.children);
var rootElement = elementRegistry.get(getPlaneIdFromShape(element));

self._moveChildrenToShape(shape, rootElement);
if (!rootElement || !element.children) {
return;
}

self._showRecursively(element.children);

self._moveChildrenToShape(element, rootElement);

});
}, true);


Expand Down

0 comments on commit 0a7dd88

Please sign in to comment.