From 7e68dd1766f823b732ff7107064d2720e3f1e7de Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Tue, 16 Apr 2024 15:52:15 -0400 Subject: [PATCH] Image changing with the slider is working. --- src/TempoLite.vue | 46 +++++++++++++--------------------------------- 1 file changed, 13 insertions(+), 33 deletions(-) diff --git a/src/TempoLite.vue b/src/TempoLite.vue index 646f36a..6312c73 100644 --- a/src/TempoLite.vue +++ b/src/TempoLite.vue @@ -11,10 +11,15 @@
- +
- +
Texas @@ -46,7 +51,7 @@ id="northeast" @click="() => { map?.fitBounds(northeastBounds); - timestep = 72; + timeIndex = 72; }" > Northeast @@ -85,20 +90,6 @@
- - - - -
@@ -507,6 +498,7 @@ export default defineComponent({ // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore this.touchscreen = ('ontouchstart' in window) || ('ontouchstart' in document.documentElement) || !!window.navigator.msPointerEnabled; + console.log(this.timeValues); }, mounted() { @@ -531,24 +523,12 @@ export default defineComponent({ pane: 'labels' }).addTo(this.map as Map); - this.imageOverlay.setUrl(this.imageUrl); + this.imageOverlay.setUrl(this.imageUrl).addTo(this.map as Map); }, computed: { - /** - These properties relate to the state of the mini. - `isLoading` is a bit redundant here, but it could potentially have - independent logic. - */ - ready(): boolean { - return this.layersLoaded && this.positionSet; - }, - isLoading(): boolean { - return !this.ready; - }, - /** Properties related to device/screen characteristics */ @@ -596,7 +576,7 @@ export default defineComponent({ } }, imageUrl(): string { - return `https://tempo-demo-images.s3.amazonaws.com/img_/${this.timeValues[this.timeIndex]}/_cividis_stretch.png`; + return `https://tempo-demo-images.s3.amazonaws.com/img_${this.timeValues[this.timeIndex]}_cividis_stretch.png`; }, }, @@ -652,6 +632,7 @@ export default defineComponent({ watch: { imageUrl(url: string) { this.imageOverlay.setUrl(url); + console.log(this.imageOverlay); } } }); @@ -719,7 +700,6 @@ body { } } - .fade-enter-active, .fade-leave-active { transition: opacity 0.3s;