I have a JointJs model that includes many elements and links. Most of the links I wish to display as lines between elements, but for certain types of links I want them to be invisible and undiscoverable to the user. I've tried a few different things that have gotten me close, but I was wondering if someone had a better or more complete solutions.
Things I've tried:
link.attr({'.connection': {opacity: 0.0}});
This does indeed make the link invisible to the user, but still shows up and is editable when the user's mouse moves over it.
link.attr({'.connection': {display: non}});
This doesn't even place the link on the palette, which does succeed in hiding it from the user, but is problematic because it is no longer tracked by the model.
For a little more background information, these links can exist but cannot be created or utilized by the user, so I don't want them to be presented to the user. However, when I query the palette for all of the links, I still want these to be present.
Thanks for any help or ideas you can provide.
You can use
this.attr("./display", "none");
(see also Hiding elements in a diagram )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With