i need create links in joint js start circle source , end triangle or viceversa, got doesn work :
var link1 = new joint.dia.link({ source: { id: rect1.id }, target: { id: rect3.id }, attrs: { '.connection': { 'stroke-width': 20 }, '.marker-source': { d: 'm 0 0 5 0 5 20 0 20 z', fill: '#232e78' }, '.marker-target': { d: 'm 0 0 5 0 5 20 0 20 z', fill: '#232e78' } } });
any idea ?, in advance !
try this. can play around paths size how want:
var link1 = new joint.dia.link({ source: { id: rect1.id }, target: { id: rect3.id }, attrs: attrs: { '.connection': { 'stroke-width': 2 }, '.marker-source': { d: 'm 0 0 5 5 0 1 0 0 1', 'stroke-width': 0, fill: '#232e78' }, '.marker-target': { d: 'm 10 -5 10 5 0 0 z', 'stroke-width': 0, fill: '#232e78' } } });
for full detail, see this fiddle
the end result looks this:
Comments
Post a Comment