Closed kumilingus closed 2 months ago
Add a callback visibility option to toggle the tools' visibility based on the current state of the cell view.
visibility
With this option and the change introduced in https://github.com/clientIO/joint/pull/2743, the double link tool can be easily implemented as follows:
new dia.ToolsView({ new linkTools.Remove({ distance: (linkView) => linkView.getConnectionLength() > 100 ? 20 : '50%' }), new linkTools.Remove({ distance: -20, visibility: (linkView) => linkView.getConnectionLength() > 100 }) })
Description
Add a callback
visibility
option to toggle the tools' visibility based on the current state of the cell view.With this option and the change introduced in https://github.com/clientIO/joint/pull/2743, the double link tool can be easily implemented as follows: