Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

JointJS - Using router on links behaves weird

As long as I don't use any routers or the attribute smooth on my links, everything is drawn correctly. Normal behavior without router

Now I wanted to use the manhattan router and things started to get weird. Every link is drawn as a filled element instead of a simple line.

It seems to me that something else does modifications on the links which somehow interferes. Activated manhattan router

Furthermore attributes like link.attr({'.marker-source': { fill: 'red', d: 'M 10 0 L 0 5 L 10 10 z' }}) are completely ignored. The black arrow heads are still shown.

Any ideas?

like image 521
Shady Avatar asked Dec 13 '25 05:12

Shady


1 Answers

JointJS library core files are joint.js and joint.css. Please make sure that none of them is missing.

JointJS + dependencies (jQuery, lodash, backbone)

<link rel="stylesheet" type="text/css" href="joint.css" />
<script src="jquery.min.js"></script>
<script src="lodash.min.js"></script>
<script src="backbone-min.js"></script>
<script src="joint.js"></script>
like image 107
Roman Avatar answered Dec 15 '25 17:12

Roman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!