code: function(cell) {
  
          var cellId = (joint.util.isString(cell) || joint.util.isNumber(cell)) ? cell : cell.id;
          var ancestor = this.getRelationshipAncestor();
  
          return !!ancestor && (ancestor.id === cellId || ancestor.isEmbeddedIn(cellId));
      }
docs: Is source, target and the link itself embedded in a given cell?