From c43e435e511bd5007c502246bffdf0a6193bc9bf Mon Sep 17 00:00:00 2001 From: Xiao Gui <xgui3783@gmail.com> Date: Wed, 7 Nov 2018 10:51:50 +0100 Subject: [PATCH] feat: warning for mobile users on power + network --- src/atlasViewer/atlasViewer.component.ts | 9 +++++++++ src/atlasViewer/atlasViewer.constantService.service.ts | 2 ++ 2 files changed, 11 insertions(+) diff --git a/src/atlasViewer/atlasViewer.component.ts b/src/atlasViewer/atlasViewer.component.ts index 21b2dc4b0..c897c231d 100644 --- a/src/atlasViewer/atlasViewer.component.ts +++ b/src/atlasViewer/atlasViewer.component.ts @@ -436,6 +436,15 @@ export class AtlasViewer implements OnDestroy, OnInit, AfterViewInit { }) return false } + + if(this.constantsService.mobile){ + this.modalService.show(ModalUnit,{ + initialState: { + title: 'Power and Network Usage warning', + body: this.constantsService.mobileWarning + } + }) + } return true } diff --git a/src/atlasViewer/atlasViewer.constantService.service.ts b/src/atlasViewer/atlasViewer.constantService.service.ts index 84a5de3a9..1e75f9b41 100644 --- a/src/atlasViewer/atlasViewer.constantService.service.ts +++ b/src/atlasViewer/atlasViewer.constantService.service.ts @@ -90,6 +90,8 @@ Unfortunately, your browser does not meet the minimum requirement to run the atl the atlas viewer requires **webgl2.0**, and the \`EXT_color_buffer_float\` extension enabled ` + public mobileWarning = `It looks like you are on a mobile device. Please note that the atlas viewer is power and network usage intensive.` + get floatingWidgetStartingPos() : [number,number]{ return [400,100] } -- GitLab