function updateCustomElementsRoot(event) {
    var context = event.context,
        oldRoot = context.oldRoot,
        newRoot = context.newRoot,
        children = oldRoot.children;

    var customChildren = children.filter(isCustom);

    if (customChildren.length) {
      modeling.moveElements(customChildren, { x: 0, y: 0 }, newRoot);
    }
  }
/**
   * When morphing a Process into a Collaboration or vice-versa,
   * make sure that the existing custom elements get their parents updated.
   */
When morphing a Process into a Collaboration or vice-versa,
make sure that the existing custom elements get their parents updated.
When morphing a Process into a Collaboration or vice - versa make sure that the existing custom elements get their parents updated .
function updateCustomElementsRoot(event) {
    var context = event.context,
        oldRoot = context.oldRoot,
        newRoot = context.newRoot,
        children = oldRoot.children;
    var customChildren = children.filter(isCustom);
    if (customChildren.length) {
      modeling.moveElements(customChildren, { x: 0, y: 0 }, newRoot);
    }
  }
function updateCustomElementsRoot ( event ) { var context = event . context , oldRoot = context . oldRoot , newRoot = context . newRoot , children = oldRoot . children ; var customChildren = children . filter ( isCustom ) ; if ( customChildren . length ) { modeling . moveElements ( customChildren , { x : 0 , y : 0 } , newRoot ) ; } }
When morphing a Process into a Collaboration or vice-versa,
 make sure that the existing custom elements get their parents updated.
When morphing a Process into a Collaboration or vice - versa make sure that the existing custom elements get their parents updated .