code: function(cellViewS, magnetS, cellViewT, magnetT, end, linkView) {
              return (end === 'target' ? cellViewT : cellViewS) instanceof joint.dia.ElementView;
          }
docs: Check whether to allow or disallow the link connection while an arrowhead end (source/target) being changed.