From 95b48ad9842c7bce2335444fb1c03c7678bc8e49 Mon Sep 17 00:00:00 2001 From: misterpekert Date: Thu, 21 Dec 2023 11:11:32 +0100 Subject: [PATCH] PR feedback --- components/DraggableMap.vue | 11 +++++++---- components/SpinButton.vue | 14 +++++--------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/components/DraggableMap.vue b/components/DraggableMap.vue index 4bbb9603..9ecf8139 100644 --- a/components/DraggableMap.vue +++ b/components/DraggableMap.vue @@ -114,27 +114,30 @@ export default { navigator.geolocation && navigator.geolocation.getCurrentPosition ) { - this.locating = true navigator.geolocation.getCurrentPosition( (position) => { // Show close to where we think they are. - this.locating = false this.mapObject.flyTo( [position.coords.latitude, position.coords.longitude], 16 ) + callback() }, - () => (this.locating = false) + () => { + this.locationFailed = true + callback() + } ) } else { console.log('Navigation not supported. ') this.locationFailed = true + callback() } } catch (e) { console.error('Find location failed with', e) this.locationFailed = true + callback() } - callback() }, idle() { this.center = this.mapObject.getCenter() diff --git a/components/SpinButton.vue b/components/SpinButton.vue index 48f3ae51..6c67043c 100644 --- a/components/SpinButton.vue +++ b/components/SpinButton.vue @@ -24,15 +24,11 @@ {{ label }} - - - - - +