Last active
December 12, 2015 00:38
-
-
Save diverted247/4685243 to your computer and use it in GitHub Desktop.
Using easeljs? To prevent element selection on clicks to canvas...
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// prevent default selection when canvas is clicked! | |
// does not interfere with catching events in easeljs apis | |
<canvas id="appCanvas"></canvas> | |
document.getElementById("appCanvas").addEventListener( "mousedown" , function(e){ e.preventDefault(); } , false ); | |
document.getElementById("appCanvas").addEventListener( "mouseup" , function(e){ e.preventDefault(); } , false ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment