Skip to content

Commit

Permalink
Merge pull request GenLite-Org#3 from snwhd/dev-k
Browse files Browse the repository at this point in the history
fix alt-tab for xp canvas
  • Loading branch information
KKonaOG authored Apr 26, 2023
2 parents 33c2419 + 1908a84 commit 4ad3531
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Client/plugins/genlite-xp-calculator.plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,18 @@ export class GenLiteXpCalculator extends GenLitePlugin {

async init() {
document.genlite.registerPlugin(this);

let plugin = this;
window.addEventListener('focus', function() {
window.addEventListener('mousemove', function onmousemove(e) {
window.removeEventListener('mousemove', onmousemove, false);
if (e.altKey) {
plugin.canvasHolder.style.pointerEvents = "auto";
} else {
plugin.canvasHolder.style.pointerEvents = "none";
}
});
});
}

async postInit() {
Expand Down

0 comments on commit 4ad3531

Please sign in to comment.