From 89fc34f82956f2410ee7f1d90e03945e10805dda Mon Sep 17 00:00:00 2001 From: Terry Truong Date: Sun, 3 Jul 2022 16:39:12 +1000 Subject: Add styling, mainly for TileInfoModal and Settings --- src/components/AncestryBar.vue | 7 +- src/components/HelpModal.vue | 51 +++++++------- src/components/IconButton.vue | 2 +- src/components/SButton.vue | 2 +- src/components/SearchModal.vue | 27 +++++--- src/components/SettingsModal.vue | 85 ++++++++++++----------- src/components/Tile.vue | 14 ++-- src/components/TileInfoModal.vue | 142 ++++++++++++++++++++++++++------------- src/components/TutorialPane.vue | 24 +++---- src/components/icon/HelpIcon.vue | 9 ++- 10 files changed, 211 insertions(+), 152 deletions(-) (limited to 'src/components') diff --git a/src/components/AncestryBar.vue b/src/components/AncestryBar.vue index cf9513f..e7ba8a5 100644 --- a/src/components/AncestryBar.vue +++ b/src/components/AncestryBar.vue @@ -26,6 +26,7 @@ export default defineComponent({ computed: { imgSz(){ return this.breadth - this.lytOpts.tileSpacing - this.uiOpts.scrollGap; + // Intentionally omitting extra tileSpacing, to allow for scrollGap with less image shrinkage }, dummyNodes(){ // Childless versions of 'nodes' used to parameterise s return this.nodes.map(n => { @@ -53,10 +54,10 @@ export default defineComponent({ watch: { // Used to scroll to end of bar upon node/screen changes nodes(){ - this.$nextTick(() => this.scrollToEnd()); // Without timeout, seems to run before new tiles are added + this.$nextTick(() => this.scrollToEnd()); }, vert(){ - setTimeout(() => this.scrollToEnd(), 0); + this.$nextTick(() => this.scrollToEnd()); }, }, methods: { @@ -67,7 +68,7 @@ export default defineComponent({ onInfoIconClick(data: string){ this.$emit('info-click', data); }, - // For converting vertical scroll to horizontal + // For converting vertical scrolling to horizontal onWheelEvt(evt: WheelEvent){ if (!this.vert && Math.abs(evt.deltaX) < Math.abs(evt.deltaY)){ this.$el.scrollLeft -= (evt.deltaY > 0 ? -30 : 30); diff --git a/src/components/HelpModal.vue b/src/components/HelpModal.vue index 7a18c05..f2ae8a4 100644 --- a/src/components/HelpModal.vue +++ b/src/components/HelpModal.vue @@ -1,30 +1,34 @@