diff options
| author | Terry Truong <terry06890@gmail.com> | 2022-07-03 16:39:12 +1000 |
|---|---|---|
| committer | Terry Truong <terry06890@gmail.com> | 2022-07-03 16:39:12 +1000 |
| commit | 89fc34f82956f2410ee7f1d90e03945e10805dda (patch) | |
| tree | 41b615f4414cf47e1da70497e5bf8173faf3f7b8 /src/components/AncestryBar.vue | |
| parent | b8694f56d687307c64ba6775f9f0d4c064a2669a (diff) | |
Add styling, mainly for TileInfoModal and Settings
Diffstat (limited to 'src/components/AncestryBar.vue')
| -rw-r--r-- | src/components/AncestryBar.vue | 7 |
1 files changed, 4 insertions, 3 deletions
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 <tile>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); |
