title: JointJS create multiple links between elements
body: <p>I'm trying create a diagram <a href="https://i.stack.imgur.com/zAwq8.png" rel="nofollow noreferrer">like this</a> using JointJS.</p>
  
  <p>However, when I'm adding multiple links between elements, I'm only seeing 1 link show up. How do I go about adding multiple links with automatically adjusted space between them?</p>
  
  <p>This is the code to add the boxes and links. Note that right now I'm just trying to add 3 links between all of the blocks, but I'm only seeing 1 link appear between each.</p>
  
  <pre><code>var steps = [{title: "Step 1"}, {title: "Step 2"}, {title: "Step 3"}];
  
  steps.forEach(function(step, i){
      var title = step.title;
      var yOffset = i*150 + 50; //offsets first block by 50 in y and all others 150
      var xOffset = 60; //offsets all blocks by 60
      createBlock(title, xOffset, yOffset, i);
  });
  
  var blocks = [];
  
  function createBlock(title, x, y, loc) {
      var x = (typeof x !== 'undefined') ?  x : 0;
      var y = (typeof y !== 'undefined') ?  y : 0;
  
      var newBlock = new joint.shapes.html.Element({
          position: { x: x, y: y },
          size: { width: 170, height: 100 },
          label: title,
          attrs: {
              '.label': {
                  text: title,
                  'ref-x': .5, 
                  'ref-y': .4,
                  fill: '#FFFFFF'
              },
          }
      });
  
      blocks.push(newBlock.id);
  
      graph.addCell(newBlock);
  
      if(blocks.length &gt; 1) {
          var link = new joint.shapes.devs.Link({
              source: {
                  id: blocks[loc-1],
              },
              target: {
                  id: blocks[loc],
              },
          });
          graph.addCell(link);
  
          var link2 = new joint.shapes.devs.Link({
              source: {
                  id: blocks[loc-1],
              },
              target: {
                  id: blocks[loc],
              },
          });
          graph.addCell(link2);
  
          var link3 = new joint.shapes.devs.Link({
              source: {
                  id: blocks[loc-1],
              },
              target: {
                  id: blocks[loc],
              },
          });
          graph.addCell(link3);
      }
  }
  </code></pre>