mouseMove event is for moving on the canvas itself, but I can't detect when the mouse leaves the canvas.
Is there an option to detect when the mouse is moving out of the canvas?
Have you tried mouseout
?
element.addEventListener ("mouseout", myFunction, false);