Closed ivanabovin closed 7 years ago
You may find your answer here: http://stackoverflow.com/questions/322378/javascript-check-if-mouse-button-down
It was not a question)
I just suggest to use document.addEventListener
for mousemove
and mouseup
events.
Some demo examples don't stop moving if we release mouse button outside browser window. Instead they continue moving when mouse cursor returns into window back.
Try Demo 10 (Image Inspector) at http://pep.briangonzalez.org/