Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
misterpekert committed Dec 21, 2023
1 parent 4a50b6d commit 95b48ad
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
11 changes: 7 additions & 4 deletions components/DraggableMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
14 changes: 5 additions & 9 deletions components/SpinButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,11 @@
<slot>{{ label }}</slot>
</span>
</b-button>
<client-only>
<teleport to="body">
<ConfirmModal
v-if="confirm && showConfirm"
@confirm="confirmed"
@hidden="onConfirmClosed"
/>
</teleport>
</client-only>
<ConfirmModal
v-if="confirm && showConfirm"
@confirm="confirmed"
@hidden="onConfirmClosed"
/>
</template>
<script setup>
import { ref } from '#imports'
Expand Down

0 comments on commit 95b48ad

Please sign in to comment.