-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix marker draggability after map size change
Oddly, the map would pan with the marker drag after switching to fullscreen mode, effectively rendering the marker almost immovable.
- Loading branch information
1 parent
abc45ae
commit 426176b
Showing
5 changed files
with
77 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { PolarGetterTree } from '@polar/lib-custom-types' | ||
import { generateSimpleGetters } from '@repositoryname/vuex-generators' | ||
import { PinsGetters, PinsState } from '../types' | ||
import { getInitialState } from './state' | ||
|
||
const getters: PolarGetterTree<PinsState, PinsGetters> = { | ||
...generateSimpleGetters(getInitialState()), | ||
toZoomLevel(_, __, ___, rootGetters) { | ||
return (rootGetters.configuration.pins || {}).toZoomLevel || 0 | ||
}, | ||
atZoomLevel(_, __, ___, rootGetters) { | ||
return ( | ||
(rootGetters.configuration.pins || {}).appearOnClick?.atZoomLevel || 0 | ||
) | ||
}, | ||
} | ||
|
||
export default getters |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { PinsState } from '../types' | ||
|
||
export const getInitialState = (): PinsState => ({ | ||
isActive: false, | ||
transformedCoordinate: [], | ||
latLon: [], | ||
coordinatesAfterDrag: [], | ||
getsDragged: false, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters