function addNodesToDrag(nodes, opts) {
    opts = opts || {};
    var hasCompoundNodes = nodes.cy().hasCompoundNodes();

    if (opts.inDragLayer) {
      nodes.forEach(setInDragLayer);
      nodes.neighborhood().stdFilter(function (ele) {
        return !hasCompoundNodes || ele.isEdge();
      }).forEach(setInDragLayer);
    }

    if (opts.addToList) {
      nodes.forEach(function (ele) {
        addToDragList(ele, opts);
      });
    }

    addDescendantsToDrag(nodes, opts); // always add to drag
    // also add nodes and edges related to the topmost ancestor

    updateAncestorsInDragLayer(nodes, {
      inDragLayer: opts.inDragLayer
    });
    r.updateCachedGrabbedEles();
  }
function addNodesToDrag(nodes, opts) {
    opts = opts || {};
    var hasCompoundNodes = nodes.cy().hasCompoundNodes();

    if (opts.inDragLayer) {
      nodes.forEach(setInDragLayer);
      nodes.neighborhood().stdFilter(function (ele) {
        return !hasCompoundNodes || ele.isEdge();
      }).forEach(setInDragLayer);
    }

    if (opts.addToList) {
      nodes.forEach(function (ele) {
        addToDragList(ele, opts);
      });
    }

    addDescendantsToDrag(nodes, opts); // always add to drag
    // also add nodes and edges related to the topmost ancestor

    updateAncestorsInDragLayer(nodes, {
      inDragLayer: opts.inDragLayer
    });
    r.updateCachedGrabbedEles();
  }
function addNodesToDrag ( nodes , opts ) { opts = opts || { } ; var hasCompoundNodes = nodes . cy ( ) . hasCompoundNodes ( ) ; if ( opts . inDragLayer ) { nodes . forEach ( setInDragLayer ) ; nodes . neighborhood ( ) . stdFilter ( function ( ele ) { return ! hasCompoundNodes || ele . isEdge ( ) ; } ) . forEach ( setInDragLayer ) ; } if ( opts . addToList ) { nodes . forEach ( function ( ele ) { addToDragList ( ele , opts ) ; } ) ; } addDescendantsToDrag ( nodes , opts ) ; // always add to drag // also add nodes and edges related to the topmost ancestor updateAncestorsInDragLayer ( nodes , { inDragLayer : opts . inDragLayer } ) ; r . updateCachedGrabbedEles ( ) ; }
adds the given nodes and its neighbourhood to the drag layer
adds the given nodes and its neighbourhood to the drag layer
add nodes to drag layer