code: function() {
  
          var connectionAncestor;
  
          if (this.graph) {
  
              var cells = [
                  this,
                  this.getSourceElement(), // null if source is a point
                  this.getTargetElement() // null if target is a point
              ].filter(function(item) {
                  return !!item;
              });
  
              connectionAncestor = this.graph.getCommonAncestor.apply(this.graph, cells);
          }
  
          return connectionAncestor || null;
      }
docs: Returns the common ancestor for the source element, target element and the link itself.