How to add a link with crow's foot erd notation in jointjs

荒凉一梦 提交于 2019-12-24 15:38:40

问题


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;


来源:https://stackoverflow.com/questions/36518524/how-to-add-a-link-with-crows-foot-erd-notation-in-jointjs

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!