This is a pretty simple question but I can't seem to find an answer.
I have a fabricjs canvas instance with a mouse eventListener attached. I also have a bunch of objects with mouse eventListeners. I do not want mouse events on the objects to get passed through to the canvas. stopPropagation and/or stopImmediatePropagation don't stop the events.
Am I using these methods wrong? Or is there a Fabricjs way to handle this?
Method on a class wrapping a Fabricjs canvas instance
this.canvas.on("mouse:down", this.handleMouseDown);
Method on a Fabricjs subclass:
testMouseDownHandler: function (event) {
event.e.stopPropagation();
event.e.stopImmediatePropagation();
event.e.preventDefault();
if (event.e.shiftKey) {
this.canvas.setActiveObject(this);
}
},