Skip to main content

Mouse events

The <AnnotationViewer/> support mouse events.#

You can use the onShapeMouseEnter, onShapeMouseLeave and onShapeClick props to bind event handlers to the <canvas/> shapes.

{    methods: {        onShapeMouseEnter: function (shape) {            console.log(shape)        },        onShapeMouseLeave: function (shape) {            console.log(shape)        },        onShapeClick: function (shape) {            console.log(shape)        },    }
    ....
}

Full example#