From 0e5debd4fb2f055484a46e56eceed7ebc29a9996 Mon Sep 17 00:00:00 2001 From: Daniel Bulant Date: Wed, 9 Jun 2021 16:58:16 +0200 Subject: [PATCH] add rotate warning --- src/App.svelte | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/src/App.svelte b/src/App.svelte index c4a4d5e..6ca77fc 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -33,14 +33,37 @@ $: console.log(dialog[$page]); console.log("Pancake recipe at https://github.com/danbulant/heaventaker"); + + var width = window.innerWidth; + var height = window.innerHeight; + var outerHeight = window.outerHeight; + var outerWidth = window.outerWidth; + + /** + * @param {UIEvent} e + */ + function resize(e) { + width = window.innerWidth; + height = window.innerHeight; + outerHeight = window.outerHeight; + outerWidth = window.outerWidth; + } - + Heaventaker +{#if width < height / 1080 * 615 * 2} +
+ + Resize or rotate your device to play. + +
+{/if} + {#if dialog[$page].map} {/if} @@ -48,3 +71,22 @@ + + \ No newline at end of file