title: JOINTJS : Self referencing a shape in a link
body: <p>I would like to self-reference a shape in a link. Basically the source and the target of the link are the same. </p>
  
  <p>It is working but the link is hidden by the shape:
  <a href="https://imageshack.com/i/f2mu7jp" rel="nofollow">https://imageshack.com/i/f2mu7jp</a></p>
  
  <p>Here is what I would like to do:
  <a href="https://imageshack.com/i/mujp9lp" rel="nofollow">https://imageshack.com/i/mujp9lp</a></p>
  
  <p>I know that I can use "vertices" in the definition of a link but I don't know the XY position of the start and the end point</p>
  
  <pre><code>var connect = function(source, sourcePort, target, targetPort) {
      var link = new joint.shapes.devs.Link({
          source: { id: source.id, selector: source.getPortSelector(sourcePort) },
          target: { id: target.id, selector: target.getPortSelector(targetPort) }
      });
      if(source == target){
          console.log(link);
          console.log(source);
      }
  
      graph.addCell(link);
  };
  </code></pre>
  
  <p>How can I get the position of the start and the end point ?</p>
  
  <p>Thank you</p>