Commit a35b03fe authored by Jacob Durrant's avatar Jacob Durrant

Fixed keypress error.

parent a10acf5b
This diff is collapsed.
This diff is collapsed.
......@@ -91,6 +91,6 @@
<script src="js/jsfile.4.babylonjs.materials.min.js"></script>
<script src="js/jsfile.5.babylon.gui.min.js"></script>
<script src="js/peer.min.js" async></script>
<script type="text/javascript" src="runtime.a6465000f17b6ac1fdc7.js"></script><script type="text/javascript" src="vendors.a6465000f17b6ac1fdc7.js"></script><script type="text/javascript" src="app.a6465000f17b6ac1fdc7.js"></script></body>
<script type="text/javascript" src="runtime.3a0a2cd98eaecc17ab2f.js"></script><script type="text/javascript" src="vendors.3a0a2cd98eaecc17ab2f.js"></script><script type="text/javascript" src="app.3a0a2cd98eaecc17ab2f.js"></script></body>
</html>
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");importScripts("precache-manifest.940899622bb7490998f5d54c13bf1b29.js");workbox.core.skipWaiting();workbox.core.clientsClaim();self.__precacheManifest=[].concat(self.__precacheManifest||[]);workbox.precaching.precacheAndRoute(self.__precacheManifest,{});workbox.routing.registerRoute(/\./,new workbox.strategies.NetworkFirst,"GET");
importScripts("https://storage.googleapis.com/workbox-cdn/releases/4.3.1/workbox-sw.js");importScripts("precache-manifest.99b21cafca7fd1a625e447097aa24488.js");workbox.core.skipWaiting();workbox.core.clientsClaim();self.__precacheManifest=[].concat(self.__precacheManifest||[]);workbox.precaching.precacheAndRoute(self.__precacheManifest,{});workbox.routing.registerRoute(/\./,new workbox.strategies.NetworkFirst,"GET");
No preview for this file type
......@@ -11,6 +11,7 @@ import * as Pickables from "./Pickables";
import * as Points from "./Points";
import * as UrlVars from "../Vars/UrlVars";
import * as Menu3D from "../UI/Menu3D/Menu3D";
import * as OpenPopup from "../UI/OpenPopup/OpenPopup";
declare var BABYLON: any;
declare var jQuery: any;
......@@ -99,12 +100,14 @@ function setupTriggers(): void {
// Space always triggers
const body = jQuery("body");
body.keypress((e: any) => {
if (e.charCode === 32) {
// Space bar
actOnStareTrigger();
} else if (e.charCode === 109) {
// M (open 3d menu).
Menu3D.openMainMenuFloorButton.toggled();
if (OpenPopup.modalCurrentlyOpen === false) {
if (e.charCode === 32) {
// Space bar
actOnStareTrigger();
} else if (e.charCode === 109) {
// M (open 3d menu).
Menu3D.openMainMenuFloorButton.toggled();
}
}
});
......
......@@ -13,6 +13,7 @@ let myTitle: any;
// let iFrameContainer: any;
let msgContainer: any;
let footer: any;
export let modalCurrentlyOpen: boolean = false;
/**
* Opens a modal.
......@@ -95,6 +96,14 @@ function openUrlModalContinue(title: string, val: string, isUrl: boolean, closeB
msgContainer = msgModal.find("#msg-container");
// myIFrame = iFrameContainer.find("iframe");
footer = msgModal.find("#modal-footer");
// First time, so also set up callbacks
msgModal.on('shown.bs.modal', function (e) {
modalCurrentlyOpen = true;
});
msgModal.on('hidden.bs.modal', function (e) {
modalCurrentlyOpen = false;
});
}
// Immediately hide.
......@@ -175,7 +184,7 @@ function openUrlModalContinue(title: string, val: string, isUrl: boolean, closeB
jQuery("#modal-close-button").hide();
msgModal.on('shown.bs.modal', function (e) {
jQuery(".modal-backdrop.show").css("opacity", 1);
})
});
options = {"backdrop": "static", "keyboard": false}
}
......
......@@ -331,7 +331,8 @@ function autoUpdateUrl(): void {
setInterval(() => {
// As long as the modal isn't open, update the url. Important to only
// do it when modal is closed. Otherwise firefox mobile environment
// select auto closes.
// select auto closes. TODO: Could use OpenPopup.modalCurrentlyOpen
// instead. Would be better.
if (jQuery("#msgModal").css("display") !== "block") {
setURL();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment