@community-release/nx-ui 0.0.73 → 0.0.74

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/dist/module.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "ui",
3
3
  "configKey": "ui",
4
- "version": "0.0.73"
4
+ "version": "0.0.74"
5
5
  }
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <section class="component-ui-map">
3
- <component :is="mapEngines[props.engine]" @initialized="emit('initialized', $event)">
3
+ <component :is="mapEngines[props.engine]" @initialized="emit('initialized', $event)" @mapClick="emit('mapClick', $event)">
4
4
  <slot :store="store"></slot>
5
5
  <div class="slot-row">
6
6
  <slot name="row" :store="store"></slot>
@@ -17,7 +17,7 @@ import comProps from '#build/ui.map.mjs';
17
17
  // // Data
18
18
  const nuxtApp = useNuxtApp();
19
19
  const store = useMapStore(nuxtApp.$pinia);
20
- const emit = defineEmits(['initialized']);
20
+ const emit = defineEmits(['initialized', 'mapClick']);
21
21
 
22
22
  const mapEngines = {
23
23
  openlayers: defineAsyncComponent(() => import(`./openlayers/index.vue`))
@@ -36,7 +36,7 @@
36
36
 
37
37
  import Map from 'ol/Map.js';
38
38
  import View from 'ol/View.js';
39
- import { fromLonLat } from 'ol/proj.js';
39
+ import { fromLonLat, toLonLat } from 'ol/proj.js';
40
40
  import {
41
41
  defaults as defaultInteractions,
42
42
  MouseWheelZoom as mouseWheelZoomInteraction,
@@ -47,7 +47,7 @@
47
47
 
48
48
 
49
49
  // Data
50
- const emit = defineEmits(['initialized']);
50
+ const emit = defineEmits(['initialized', 'mapClick']);
51
51
  const refMap = ref(null);
52
52
  let map = null;
53
53
  let view = null;
@@ -382,6 +382,12 @@
382
382
 
383
383
  // Handle map marker click
384
384
  map.on('click', (e) => {
385
+ const coords = toLonLat(e.coordinate);
386
+ const longitude = coords[0];
387
+ const latitude = coords[1];
388
+
389
+ emit('mapClick', {latitude, longitude});
390
+
385
391
  cluster.getFeatures(e.pixel).then((clickedFeatures) => {
386
392
  let clickedOnMarker = false;
387
393
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@community-release/nx-ui",
3
- "version": "0.0.73",
3
+ "version": "0.0.74",
4
4
  "packageManager": "pnpm@10.14.0",
5
5
  "description": "nx-ui - Nuxt UI library",
6
6
  "repository": {