Reputation: 298
I am developing a simple graphic tool using JointJs. while double clicking on a element will executes a function. How to prevent double click event for rectangle.
Already tried the below snippet but I need to drag the rectangle
rect: {
style: { 'pointer-events': 'none' }
}
Upvotes: 0
Views: 664
Reputation: 1428
paper.on('cell:pointerdblclick', function(cellView) {
if (cellView.model.get('type') === 'basic.Rect') {
return;
}
console.log("not a rect")
});
or, using css:
.joint-element[data-type="basic.Rect"] {
pointer-events: none;
}
Upvotes: 1