Skip to content Skip to sidebar Skip to footer

Mouse:down Vs. Mousedown In Fabric.js

Here is a fabric.js example with a canvas and a rectangle, with a mouse down handler on each: var canvas = new fabric.Canvas('c'); var rect = new fabric.Rect({ left: 100, to

Solution 1:

They are both fabric js events. The main difference is the type of instances to which the events are attached. mouse:down is a event specific for the fabric Canvas instance while mousedown is specific to a fabric Object instance, in your case a rect.

There are different types of events that can be listened on a Canvas and on an Object instance. The full list of available events is available on fabric js official site.

The events specific to the Canvas instance are presented in detail on the library official GitHub page in this post.

Post a Comment for "Mouse:down Vs. Mousedown In Fabric.js"