How to add a link with crow's foot erd notatio

2019-08-15 04:58发布

问题:

Is there any way to have a link in crow's foot notation with JointJS?

If yes, what would be the code look like?

回答1:

Yes, you can make crow feet notation in jointjs. Need to edit in shapes, Code for one-to-many is

case '1 optional-N optional':
    attrs = {
             '.marker-source': {
               d: 'M 10 0 L 10 20 L 10 10 L 0 10 L 14 10 a 5,5 0 1,0 10,0 a 5,5 0 1,0 -10,0',
               fill: '#FFFFFF'
              },
             '.marker-target': {
               d: "M 0 0 L 10 10 L 0 10 L 10 10 L 0 20 L 10 10 a 5,5 0 1,0 10,0 a 5,5 0 1,0 -10,0",
               fill: '#FFFFFF'
              }
    };
break;



标签: jointjs