@rural-environmental-registry/map_component 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rural-environmental-registry/map_component",
3
- "version": "2.0.4",
3
+ "version": "2.0.5",
4
4
  "description": "Map component for Vue.js applications",
5
5
  "main": "dist/index.mjs",
6
6
  "module": "dist/index.mjs",
@@ -7,7 +7,7 @@
7
7
 
8
8
  <script setup lang="ts">
9
9
  import L from 'leaflet'
10
- import { nextTick, onBeforeUnmount, onMounted, ref } from 'vue'
10
+ import { nextTick, onBeforeUnmount, onMounted, shallowRef } from 'vue'
11
11
  import DrawingControlHandler from '../../handlers/drawingControl'
12
12
  import MapHandler from '../../handlers/mapHandler'
13
13
  import { DEFAULT_MAP_OPTIONS } from '../../handlers/constants'
@@ -45,9 +45,9 @@
45
45
 
46
46
  const props = defineProps<MapProps>()
47
47
 
48
- const map = ref<L.Map>()
49
- const layerControl = ref<L.Control.Layers>()
50
- const drawItemsGroup = ref<L.FeatureGroup>()
48
+ const map = shallowRef<L.Map>()
49
+ const layerControl = shallowRef<L.Control.Layers>()
50
+ const drawItemsGroup = shallowRef<L.FeatureGroup>()
51
51
 
52
52
  let mapHandlerInstance: MapHandler | null = null
53
53
  let mapToolsHandler: MapToolsHandler | null = null
@@ -318,7 +318,7 @@
318
318
  initDefaultLayers()
319
319
  })
320
320
  },
321
- { immediate: true, deep: true }
321
+ { immediate: true }
322
322
  )
323
323
 
324
324
  const onChildLayerChange = (layer: LayerData): void => {
@@ -508,4 +508,4 @@
508
508
  border-color: var(--mapa-base-white);
509
509
  }
510
510
  }
511
- </style>
511
+ </style>