From 5da96e9c6f9875c3768eb7eaf8ffae4082b28cc5 Mon Sep 17 00:00:00 2001 From: Justin Georgi Date: Tue, 26 Mar 2024 08:33:03 -0700 Subject: [PATCH] Add fullscreen setting to detect pages Signed-off-by: Justin Georgi --- src/pages/detect.vue | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/pages/detect.vue b/src/pages/detect.vue index 3a9468e..ea64164 100644 --- a/src/pages/detect.vue +++ b/src/pages/detect.vue @@ -4,6 +4,7 @@ {{ regions[activeRegion] }} + @@ -119,6 +120,7 @@ import submitMixin from './submit-mixin' import detectionMixin from './detection-mixin' import cameraMixin from './camera-mixin' +import App from 'framework7-vue/components/app' export default { mixins: [submitMixin, detectionMixin, cameraMixin], @@ -148,6 +150,7 @@ serverSettings: {}, otherSettings: {}, isCordova: !!window.cordova, + isFullscreen: false, uploadUid: null, uploadDirty: false, modelLocation: '', @@ -465,6 +468,17 @@ } }) return cvsCoords + }, + toggleFullscreen() { + if (document.fullscreenElement) { + document.exitFullscreen().then( () => { + this.isFullscreen = false + }) + } else { + app.requestFullscreen().then( () => { + this.isFullscreen = true + }) + } } } } -- 2.49.1