Display remove button above and vertex tool below the link labels #2686
-
IntroductionI have a label that opens a pop-up when clicked. This link has two tools - vertex tool & remove tool. How can I achieve this functionality in JointJs v4? Steps to reproduceNo response Restrictions & ConstraintsNo response Does your question relate to JointJS or JointJS+. Select both if applicable.JointJS |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Currently, this is not possible. However, it turns out that the current solution with the extra path overlay does not meet all requirements. Here is a workaround for now. Something similar will soon turn into a feature. const Vertices = joint.linkTools.Vertices.extend({
pathNode: null,
renderChildren: function() {
const { pathSelector = 'wrapper' } = this.options;
const el = this.relatedView.findNode(pathSelector);
if (!el) return;
this.delegateElementEvents(el, {
mousedown: 'onLinkPointerDown',
touchstart: 'onLinkPointerDown',
});
this.pathNode = el;
},
onLinkPointerDown: function(evt) {
this.relatedView.preventDefaultInteraction(evt);
this.onPathPointerDown(evt);
},
onRemove: function() {
joint.linkTools.Vertices.prototype.onRemove.apply(this, arguments);
this.undelegateElementEvents(this.pathNode);
},
updatePath: function() {
// noop
},
}); The value of new Vertices({ stopPropagation: false, pathSelector: 'outline' }), |
Beta Was this translation helpful? Give feedback.
Currently, this is not possible. However, it turns out that the current solution with the extra path overlay does not meet all requirements.
Here is a workaround for now. Something similar will soon turn into a feature.