File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
packages/core/src/components Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ import MapUi from './MapUi.vue'
5858// NOTE: OpenLayers styles need to be imported as the map resides in the shadow DOM
5959import ' ol/ol.css'
6060
61+ const isMacOS = navigator .userAgent .indexOf (' Mac' ) !== - 1
62+
6163export default Vue .extend ({
6264 components: {
6365 MapUi ,
@@ -91,13 +93,8 @@ export default Vue.extend({
9193 ' moveHandle' ,
9294 ' moveHandleActionButton' ,
9395 ]),
94- isMacOS() {
95- return navigator .userAgent .indexOf (' Mac' ) !== - 1
96- },
9796 overlayLocale() {
98- return ` common:overlay.${
99- this .isMacOS ? ' noCommandOnZoom' : ' noControlOnZoom'
100- } `
97+ return ` common:overlay.${isMacOS ? ' noCommandOnZoom' : ' noControlOnZoom' } `
10198 },
10299 renderMoveHandle() {
103100 return (
@@ -213,7 +210,7 @@ export default Vue.extend({
213210 },
214211 wheelEffect(event : WheelEvent ) {
215212 clearTimeout (this .noControlOnZoomTimeout )
216- this .noControlOnZoom = this . isMacOS ? ! event .metaKey : ! event .ctrlKey
213+ this .noControlOnZoom = isMacOS ? ! event .metaKey : ! event .ctrlKey
217214 this .noControlOnZoomTimeout = setTimeout (
218215 () => (this .noControlOnZoom = false ),
219216 2000
You can’t perform that action at this time.
0 commit comments