File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/plugins/geoLocation/components Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -21,11 +21,13 @@ import { useCoreStore } from '@/core/stores'
2121import { useGeoLocationStore } from ' ../store'
2222import { PluginId } from ' ../types'
2323
24- const { layout, center } = storeToRefs (useCoreStore ())
24+ const { layout, center, zoom } = storeToRefs (useCoreStore ())
2525const geoLocationStore = useGeoLocationStore ()
2626const { state } = storeToRefs (geoLocationStore )
2727const { position, mapHasBeenMovedByUser } = storeToRefs (geoLocationStore )
2828
29+ let lastZoom = zoom .value
30+
2931const icon = computed (() => {
3032 if (state .value === ' LOCATED' ) {
3133 return ' kern-icon-fill--near-me'
@@ -44,7 +46,10 @@ const tooltipPosition = computed(() =>
4446)
4547
4648watch (center , () => {
47- if (position .value !== center .value ) {
49+ const isZooming = zoom .value !== lastZoom
50+ lastZoom = zoom .value
51+
52+ if (! isZooming && position .value !== center .value ) {
4853 mapHasBeenMovedByUser .value = true
4954 }
5055})
You can’t perform that action at this time.
0 commit comments