From 88b789c466c079a7b02cb0acb30f680b91dc8880 Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Thu, 30 Jun 2022 15:42:59 +1000 Subject: For large screens, place tutorial-pane on bottom-right --- src/App.vue | 54 +++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 13 deletions(-) (limited to 'src/App.vue') diff --git a/src/App.vue b/src/App.vue index 0cf2df0..f54cb31 100644 --- a/src/App.vue +++ b/src/App.vue @@ -23,7 +23,7 @@
- @@ -48,16 +48,18 @@
- + + :nodeName="infoModalNodeName" :infoResponse="infoModalData" :tolMap="tolMap" :lytOpts="lytOpts" + :uiOpts="uiOpts" class="z-10" @close="infoModalNodeName = null"/> - + @@ -189,13 +191,39 @@ export default defineComponent({ }; }, tutPaneContainerStyles(): Record { - return { - minHeight: (this.tutPaneOpen ? this.uiOpts.tutPaneSz : 0) + 'px', - maxHeight: (this.tutPaneOpen ? this.uiOpts.tutPaneSz : 0) + 'px', - transitionDuration: this.uiOpts.transitionDuration + 'ms', - transitionProperty: 'max-height, min-height', - overflow: 'hidden', - }; + if (this.uiOpts.breakpoint != 'lg'){ + return { + minHeight: (this.tutPaneOpen ? this.uiOpts.tutPaneSz : 0) + 'px', + maxHeight: (this.tutPaneOpen ? this.uiOpts.tutPaneSz : 0) + 'px', + transitionProperty: 'max-height, min-height', + transitionDuration: this.uiOpts.transitionDuration + 'ms', + overflow: 'hidden', + }; + } else { + return { + position: 'absolute', + bottom: '0.5cm', + right: '0.5cm', + zIndex: '1', + visibility: this.tutPaneOpen ? 'visible' : 'hidden', + transitionProperty: 'visibility', + transitionDuration: this.uiOpts.transitionDuration + 'ms', + }; + } + }, + tutPaneStyles(): Record { + if (this.uiOpts.breakpoint != 'lg'){ + return { + height: this.uiOpts.tutPaneSz + 'px', + } + } else { + return { + height: this.uiOpts.tutPaneSz + 'px', + maxWidth: '10cm', + borderRadius: this.uiOpts.borderRadius + 'px', + boxShadow: '0 0 3px black', + }; + } }, ancestryBarContainerStyles(): Record { let ancestryBarBreadth = this.detachedAncestors == null ? 0 : this.uiOpts.ancestryBarBreadth; -- cgit v1.2.3