konvajs / konva

Konva.js is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.

Home Page:http://konvajs.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Event when you mousedown and move outside canvas.

bogdan-nourescu opened this issue · comments

Starting from this code:
https://konvajs.org/downloads/code/select_and_transform/Basic_demo.html

I just added a console.log("eventName") on each of the event listeners: mouseup, click, mousedown.
If you start a selection and finish it, with will only print "mousedown mouseup"
If you start a selection, and don't release the mouse until you exit the canvas, the events start behaving differently. If you do the same thing as before, it will print "mousedown mouseup click"
Animation

I changed a demo bit. The selection rectangle hit area is affecting events flow. Disabling events for it with listening: false works better.