Skip to content

Commit

Permalink
[To be tested on remote] Deactivate Enter button until spinner has st…
Browse files Browse the repository at this point in the history
…opped.
  • Loading branch information
yrammos committed Sep 14, 2024
1 parent e7f718f commit 7f03705
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions dist/js/LT.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
const Tone = require('Tone');

freezeClick = false; // just modify that variable to disable all clics events

document.addEventListener("click", e => {
if (freezeClick) {
e.stopPropagation();
e.preventDefault();
}
}, true);

class GameController {
constructor(app) {
// setup play/pause button
Expand Down Expand Up @@ -613,11 +622,11 @@ class GameView {
toggleLoading() {
if (this.loadingContainer.classList.contains('active')) {
this.loadingContainer.classList.remove('active');
this.loadingContainer.style.pointerEvents = 'auto';
freezeClick = false
}
else {
this.loadingContainer.classList.add('active');
this.loadingContainer.style.pointerEvents = 'none';
freezeClick = true
}
}
}
Expand Down

0 comments on commit 7f03705

Please sign in to comment.