@vcmap/ui 6.1.3 → 6.1.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/dist/assets/ui.js CHANGED
@@ -1 +1 @@
1
- export * from "./ui-5ef524db.js";
1
+ export * from "./ui-1641b3cc.js";
@@ -1 +1 @@
1
- export * from "./vue-ece669b0.js";
1
+ export * from "./vue-4c430de5.js";
@@ -10,7 +10,7 @@ function loadCss(href) {
10
10
  elem.onerror = reject;
11
11
  document.head.appendChild(elem);
12
12
  });
13
- } await loadCss('./assets/vuetify-da3c1834.css');import { watch as Q, onScopeDispose as Ze, effectScope as Zl, shallowRef as K, Fragment as ie, reactive as it, computed as b, watchEffect as Fe, toRefs as Yt, capitalize as Nn, isVNode as Rc, Comment as Nc, unref as ot, warn as ja, getCurrentInstance as Hc, ref as j, provide as De, inject as ye, defineComponent as zc, camelize as Ir, h as Gt, toRaw as Be, createVNode as r, mergeProps as O, onBeforeUnmount as Qe, readonly as Ql, onDeactivated as _r, onActivated as Wc, onMounted as Ye, nextTick as we, TransitionGroup as Jl, Transition as jt, isRef as Tn, toRef as $, onBeforeMount as ra, withDirectives as $e, resolveDirective as gt, vShow as Ct, onUpdated as jc, Text as Uc, resolveDynamicComponent as Yc, markRaw as Gc, Teleport as Kc, cloneVNode as qc, createTextVNode as Tt, onUnmounted as Tr, onBeforeUpdate as Xc, withModifiers as Tl, toDisplayString as Zc, vModelText as Qc, resolveComponent as Jc, render as Ar } from "./vue-ece669b0.js";
13
+ } await loadCss('./assets/vuetify-42302ee6.css');import { watch as Q, onScopeDispose as Ze, effectScope as Zl, shallowRef as K, Fragment as ie, reactive as it, computed as b, watchEffect as Fe, toRefs as Yt, capitalize as Nn, isVNode as Rc, Comment as Nc, unref as ot, warn as ja, getCurrentInstance as Hc, ref as j, provide as De, inject as ye, defineComponent as zc, camelize as Ir, h as Gt, toRaw as Be, createVNode as r, mergeProps as O, onBeforeUnmount as Qe, readonly as Ql, onDeactivated as _r, onActivated as Wc, onMounted as Ye, nextTick as we, TransitionGroup as Jl, Transition as jt, isRef as Tn, toRef as $, onBeforeMount as ra, withDirectives as $e, resolveDirective as gt, vShow as Ct, onUpdated as jc, Text as Uc, resolveDynamicComponent as Yc, markRaw as Gc, Teleport as Kc, cloneVNode as qc, createTextVNode as Tt, onUnmounted as Tr, onBeforeUpdate as Xc, withModifiers as Tl, toDisplayString as Zc, vModelText as Qc, resolveComponent as Jc, render as Ar } from "./vue-4c430de5.js";
14
14
  function rt(e, n) {
15
15
  let t;
16
16
  function a() {
@@ -1 +1 @@
1
- export * from "./vuetify-da3c1834.js";
1
+ export * from "./vuetify-42302ee6.js";
package/dist/index.html CHANGED
@@ -103,10 +103,6 @@
103
103
  <div id="loading-content"></div>
104
104
  </div>
105
105
  </div>
106
- <script type="module">
107
- import { initAppFromAppConfig } from './assets/ui.js';
108
-
109
- initAppFromAppConfig('#app', 'app.config.json');
110
- </script>
106
+ <script src="./assets/start.js" type="module"></script>
111
107
  </body>
112
108
  </html>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcmap/ui",
3
- "version": "6.1.3",
3
+ "version": "6.1.5",
4
4
  "author": "Virtual City Systems",
5
5
  "license": "MIT",
6
6
  "scripts": {
@@ -57,7 +57,7 @@
57
57
  },
58
58
  "peerDependencies": {
59
59
  "@vcmap-cesium/engine": "^11.0.2",
60
- "@vcmap/core": "^6.1.3",
60
+ "@vcmap/core": "^6.1.5",
61
61
  "ol": "^10.4.0",
62
62
  "vue": "~3.4.38",
63
63
  "vuetify": "^3.7.14"
@@ -132,21 +132,15 @@ function getFeaturesFromOlMap(map, pixel, hitTolerance, drill) {
132
132
  * Retrieves features from a Cesium scene at a given window position.
133
133
  * @param {import("@vcmap-cesium/engine").Scene} scene
134
134
  * @param {import("@vcmap-cesium/engine").Ray} ray
135
- * @param {number} hitTolerance
136
135
  * @param {number} drill
137
136
  * @returns {Promise<{ features: import("@vcmap/core").EventFeature[], minZ: number }>}
138
137
  */
139
- async function getFeaturesFromScene(scene, ray, hitTolerance, drill) {
138
+ async function getFeaturesFromScene(scene, ray, drill) {
140
139
  const { depthTestAgainstTerrain } = scene.globe;
141
140
  scene.globe.depthTestAgainstTerrain = false;
142
141
 
143
142
  let minZ = 0;
144
- const objects = await scene.drillPickFromRay(
145
- ray,
146
- drill,
147
- undefined,
148
- hitTolerance,
149
- );
143
+ const objects = await scene.drillPickFromRay(ray, drill);
150
144
 
151
145
  scene.globe.depthTestAgainstTerrain = depthTestAgainstTerrain;
152
146
 
@@ -213,12 +207,7 @@ async function getDeepPickingFeatures(
213
207
  );
214
208
  const ray = new Ray(origin, direction);
215
209
 
216
- ({ features, minZ } = await getFeaturesFromScene(
217
- scene,
218
- ray,
219
- hitTolerance,
220
- drillLimit,
221
- ));
210
+ ({ features, minZ } = await getFeaturesFromScene(scene, ray, drillLimit));
222
211
  }
223
212
 
224
213
  if (
@@ -34,7 +34,8 @@
34
34
  return {
35
35
  rgbaObject: useColorObject(() => localValue.value?.color),
36
36
  updateColor(rgba) {
37
- localValue.value.color = [rgba.r, rgba.g, rgba.b, rgba.a];
37
+ // Ensures alpha is not null, e.g. when the color is set by the user by pastying a color code.
38
+ localValue.value.color = [rgba.r, rgba.g, rgba.b, rgba.a ?? 1];
38
39
  },
39
40
  };
40
41
  },
@@ -49,7 +49,7 @@
49
49
  * @vue-prop {import("ol/style/Stroke").Options} [modelValue] - The Stroke Options
50
50
  */
51
51
  export default {
52
- name: 'VcsFillSelector',
52
+ name: 'VcsStrokeSelector',
53
53
  components: {
54
54
  VSheet,
55
55
  VColorPicker,
@@ -81,6 +81,7 @@
81
81
  },
82
82
  }),
83
83
  updateColor(rgba) {
84
+ // Ensures alpha is not null, e.g. when the color is set by the user by pastying a color code.
84
85
  localValue.value.color = [rgba.r, rgba.g, rgba.b, rgba.a ?? 1];
85
86
  },
86
87
  cid,
@@ -474,7 +474,7 @@
474
474
  </VcsFormSection>
475
475
  </template>
476
476
  <script>
477
- import { computed } from 'vue';
477
+ import { computed, toRaw } from 'vue';
478
478
  import { VContainer, VRow, VCol, VDivider } from 'vuetify/components';
479
479
  import { VectorProperties } from '@vcmap/core';
480
480
  import {
@@ -744,7 +744,7 @@
744
744
  title: 'components.style.reset',
745
745
  icon: '$vcsReturn',
746
746
  callback: () => {
747
- localValue.value = props.valueDefault;
747
+ localValue.value = structuredClone(toRaw(props.valueDefault));
748
748
  },
749
749
  },
750
750
  ]
@@ -537,6 +537,7 @@ class WMSGroupContentTreeItem extends VcsObjectContentTreeItem {
537
537
  });
538
538
  childItems.forEach((childItem) => {
539
539
  this._app.contentTree.add(childItem);
540
+ childItem.disabled = this.disabled;
540
541
  this._listeners.push(
541
542
  childItem.clickedEvent.addEventListener(() => {
542
543
  this._handleChildClickedEvent(childItem);
@@ -347,10 +347,9 @@
347
347
  const { action: locatorAction, destroy: destroyLocator } =
348
348
  createLocatorAction(app);
349
349
 
350
- const showLocatorButton = ref(true);
351
- if (app.uiConfig.getByKey('showLocator')?.value === false) {
352
- showLocatorButton.value = false;
353
- }
350
+ const showLocatorButton = computed(() => {
351
+ return app.uiConfig.config.showLocator ?? true;
352
+ });
354
353
 
355
354
  const overviewMapListeners = [
356
355
  app.overviewMap.map.layerCollection.added.addEventListener(() => {
@@ -78,7 +78,7 @@ declare const _default: import("vue").DefineComponent<{}, {
78
78
  disabled?: boolean | undefined;
79
79
  };
80
80
  showOverviewButton: import("vue").Ref<boolean>;
81
- showLocatorButton: import("vue").Ref<boolean>;
81
+ showLocatorButton: import("vue").ComputedRef<boolean>;
82
82
  hideRotationButton: import("vue").ComputedRef<boolean | undefined>;
83
83
  homeAction: any;
84
84
  rotationAction: any;
@@ -278,6 +278,7 @@ export function createVcsVuetify(i18n) {
278
278
  },
279
279
  VTooltip: {
280
280
  openOnHover: allowTooltip,
281
+ maxWidth: 480,
281
282
  },
282
283
  },
283
284
  defaultAssets: {
File without changes