Skip to content

Commit

Permalink
Fixed annoying selection of the main canvas / the body / html.
Browse files Browse the repository at this point in the history
  • Loading branch information
1j01 committed Jul 10, 2013
1 parent 06579dd commit 579c836
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
7 changes: 7 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@
image-rendering: -webkit-optimize-contrast;
image-rendering: -o-crisp-edges;
image-rendering: optimize-contrast;
cursor: default;
}
canvas,body,html,#gui-overlay{
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.tool:hover,.color:hover{
box-shadow: 0 0 2px 1px rgba(0,0,0,0.4) inset, 0 0 1px 3px rgba(255,255,255,0.4) inset;
Expand Down
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
var canvas = document.querySelector("canvas");
var mainctx = canvas.getContext("2d");
addEventListener('contextmenu',function(e){return!!e.preventDefault()});
addEventListener('mousedown',function(e){return!!e.preventDefault()});
//addEventListener('mousedown',function(e){return!!e.preventDefault()});

var editing = true;
var gui = new GUI();
Expand Down

0 comments on commit 579c836

Please sign in to comment.