Skip to content

Commit

Permalink
Tired of the mouse cursor getting in the way...
Browse files Browse the repository at this point in the history
  • Loading branch information
sz3 committed Mar 4, 2021
1 parent 21e39db commit 0626afc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
opacity: 0;
pointer-events: auto;
}
#invisible_click.active {
cursor: none;
}
#nav-container:focus-within + #invisible_click {
pointer-events: none;
display: none;
Expand Down
9 changes: 9 additions & 0 deletions web/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ return {
var res = Module._encode(data.byteOffset, data.length);
console.log(res);
Main.setTitle(filename);
Main.setActive(true);
},

dragDrop : function(event)
Expand Down Expand Up @@ -121,6 +122,14 @@ return {
}
},

setActive : function(active)
{
// hide cursor when there's a barcode active
var invisi = document.getElementById("invisible_click");
invisi.classList.remove("active");
invisi.classList.add("active");
},

setColorBits : function(color_bits)
{
Module._configure(color_bits);
Expand Down

0 comments on commit 0626afc

Please sign in to comment.