lib/features/move/Move.js
function removeNested(elements) {

  var ids = groupBy(elements, 'id');

  return filter(elements, function(element) {
    while ((element = element.parent)) {

      // parent in selection
      if (ids[element.id]) {
        return false;
      }
    }

    return true;
  });
}
function removeNested(elements) {

  var ids = groupBy(elements, 'id');

  return filter(elements, function(element) {
    while ((element = element.parent)) {

      // parent in selection
      if (ids[element.id]) {
        return false;
      }
    }

    return true;
  });
}
function removeNested ( elements ) { var ids = groupBy ( elements , 'id' ) ; return filter ( elements , function ( element ) { while ( ( element = element . parent ) ) { // parent in selection if ( ids [ element . id ] ) { return false ; } } return true ; } ) ; }
Return a filtered list of elements that do not contain
those nested into others.

@param  {Array<djs.model.Base>} elements

@return {Array<djs.model.Base>} filtered
Return a filtered list of elements that do not contain those nested into others .