code: 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();
    }
docs: adds the given nodes and its neighbourhood to the drag layer