@vcmap/viewshed 3.0.0 → 3.0.1

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/index.js CHANGED
@@ -217,7 +217,7 @@ class Nt extends Pe {
217
217
  }
218
218
  }
219
219
  }
220
- const g = {
220
+ const p = {
221
221
  CONE: "cone",
222
222
  THREESIXTY: "360"
223
223
  };
@@ -266,7 +266,7 @@ const I = class I extends Ae {
266
266
  aspectRatio: ((n = t.frustumOptions) == null ? void 0 : n.aspectRatio) || I.getDefaultOptions().frustum.aspectRatio
267
267
  }, this._headingPitchRollValues = t.orientation || {
268
268
  ...I.getDefaultOptions().orientation
269
- }, this._position = t.position || I.getDefaultOptions().position, this._viewshedType = At(t.viewshedType, g), this._colors = {
269
+ }, this._position = t.position || I.getDefaultOptions().position, this._viewshedType = At(t.viewshedType, p), this._colors = {
270
270
  visibleColor: Z.fromCssColorString(
271
271
  ((d = t.colorOptions) == null ? void 0 : d.visibleColor) || I.getDefaultOptions().visibleColor
272
272
  ),
@@ -322,7 +322,7 @@ const I = class I extends Ae {
322
322
  * @param {number} value The distance in meters.
323
323
  */
324
324
  set distance(t) {
325
- this._frustumOptions.far = t > I.MIN_DISTANCE ? t : I.MIN_DISTANCE, this._shadowCamera && (this._shadowCamera.frustum.far = this._frustumOptions.far, this._viewshedType === g.THREESIXTY && this._updateShadowMap(), this._viewshedType === g.CONE && this._updatePrimitive());
325
+ this._frustumOptions.far = t > I.MIN_DISTANCE ? t : I.MIN_DISTANCE, this._shadowCamera && (this._shadowCamera.frustum.far = this._frustumOptions.far, this._viewshedType === p.THREESIXTY && this._updateShadowMap(), this._viewshedType === p.CONE && this._updatePrimitive());
326
326
  }
327
327
  /**
328
328
  * Returns the reach of the viewshed.
@@ -336,7 +336,7 @@ const I = class I extends Ae {
336
336
  * @param {number} value The field of view in degrees.
337
337
  */
338
338
  set fov(t) {
339
- this._frustumOptions.fov = t * k.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.frustum.fov = t * k.RADIANS_PER_DEGREE, this._viewshedType === g.CONE && (this._updateShadowMap(), this._updatePrimitive()));
339
+ this._frustumOptions.fov = t * k.RADIANS_PER_DEGREE, this._shadowCamera && (this._shadowCamera.frustum.fov = t * k.RADIANS_PER_DEGREE, this._viewshedType === p.CONE && (this._updateShadowMap(), this._updatePrimitive()));
340
340
  }
341
341
  /**
342
342
  * Returns the field of view.
@@ -356,7 +356,7 @@ const I = class I extends Ae {
356
356
  pitch: this._shadowCamera.pitch,
357
357
  roll: 0
358
358
  }
359
- }), this._viewshedType === g.CONE && this._updatePrimitive());
359
+ }), this._viewshedType === p.CONE && this._updatePrimitive());
360
360
  }
361
361
  /**
362
362
  * Getter for the heading of a cone viewshed.
@@ -372,7 +372,7 @@ const I = class I extends Ae {
372
372
  set pitch(t) {
373
373
  if (this._headingPitchRollValues.pitch = t * k.RADIANS_PER_DEGREE, this._shadowCamera) {
374
374
  const o = t * k.RADIANS_PER_DEGREE - this._shadowCamera.pitch;
375
- this._shadowCamera.lookUp(o), this._viewshedType === g.CONE && this._updatePrimitive();
375
+ this._shadowCamera.lookUp(o), this._viewshedType === p.CONE && this._updatePrimitive();
376
376
  }
377
377
  }
378
378
  /**
@@ -441,7 +441,7 @@ const I = class I extends Ae {
441
441
  context: this._scene.context,
442
442
  lightCamera: this._shadowCamera,
443
443
  enabled: !0,
444
- isPointLight: this._viewshedType === g.THREESIXTY,
444
+ isPointLight: this._viewshedType === p.THREESIXTY,
445
445
  softShadows: !0,
446
446
  fromLightSource: !0,
447
447
  cascadesEnabled: !1,
@@ -458,7 +458,7 @@ const I = class I extends Ae {
458
458
  this._showPrimitive && this._active && this._scene ? (this._removePrimitive(), this._primitive = new Nt({
459
459
  camera: this._shadowCamera,
460
460
  allowPicking: !1,
461
- spot: this._viewshedType === g.CONE
461
+ spot: this._viewshedType === p.CONE
462
462
  }), this._scene.primitives.add(this._primitive)) : this._removePrimitive();
463
463
  }
464
464
  /**
@@ -469,7 +469,7 @@ const I = class I extends Ae {
469
469
  if (!this._shadowCamera)
470
470
  return;
471
471
  const o = W.fromDegrees(t[0], t[1], t[2]);
472
- if (this.distance = W.distance(this._shadowCamera.position, o), this.type === g.CONE && !o.equals(this._shadowCamera.position)) {
472
+ if (this.distance = W.distance(this._shadowCamera.position, o), this.type === p.CONE && !o.equals(this._shadowCamera.position)) {
473
473
  const e = new W();
474
474
  W.subtract(o, this._shadowCamera.position, o), W.normalize(o, o), W.normalize(this._shadowCamera.position, e), this._shadowCamera.setView({
475
475
  orientation: {
@@ -574,13 +574,13 @@ function Lt(i, t, o) {
574
574
  function h(a = !0) {
575
575
  C(), l(), u(), e.value = null, a && o.clearSelection(), s.value = null, n.value = null;
576
576
  }
577
- function p(a) {
577
+ function w(a) {
578
578
  C(), u(), i.maps.activeMap instanceof G && (e.value = a, a.activate(i.maps.activeMap), C = i.maps.activeMap.shadowMapChanged.addEventListener((r) => {
579
579
  var _;
580
580
  r !== ((_ = e.value) == null ? void 0 : _.shadowMap) && h(!1);
581
581
  }));
582
582
  }
583
- async function w(a) {
583
+ async function g(a) {
584
584
  h(), await Ze();
585
585
  const { eventHandler: r } = i.maps, { featureInteraction: _ } = r, v = new x({
586
586
  viewshedType: a,
@@ -590,7 +590,7 @@ function Lt(i, t, o) {
590
590
  },
591
591
  heightOffset: d.value === P.ABSOLUTE ? 0 : ge
592
592
  });
593
- p(v);
593
+ w(v);
594
594
  const E = new xt(e.value);
595
595
  E.finished.addEventListener(() => {
596
596
  l(), e.value ? (e.value.showPrimitive = !0, n.value = y.EDIT) : h();
@@ -635,7 +635,7 @@ function Lt(i, t, o) {
635
635
  l();
636
636
  }
637
637
  function N(a, r) {
638
- l(), e.value !== r && (p(r), d.value = r.heightOffset ? P.RELATIVE : P.ABSOLUTE), s.value = !!r.properties.title, n.value = a, s.value && o.setVisibility(r.name, !0);
638
+ l(), e.value !== r && (w(r), d.value = r.heightOffset ? P.RELATIVE : P.ABSOLUTE), s.value = !!r.properties.title, n.value = a, s.value && o.setVisibility(r.name, !0);
639
639
  }
640
640
  const S = [
641
641
  o.collectionComponent.collection.removed.addEventListener(
@@ -681,7 +681,7 @@ function Lt(i, t, o) {
681
681
  currentViewshed: e,
682
682
  currentIsPersisted: s,
683
683
  currentEditSession: c,
684
- createViewshed: w,
684
+ createViewshed: g,
685
685
  viewViewshed(a) {
686
686
  N(y.VIEW, a);
687
687
  },
@@ -776,9 +776,9 @@ const Se = (i, t) => {
776
776
  Y: void 0,
777
777
  Z: void 0
778
778
  }), h = te();
779
- let p = () => {
779
+ let w = () => {
780
780
  };
781
- const w = q({
781
+ const g = q({
782
782
  showPrimitive: !1,
783
783
  distance: void 0,
784
784
  fov: void 0,
@@ -789,7 +789,7 @@ const Se = (i, t) => {
789
789
  e.value && (u.X = e.value.position[0], u.Y = e.value.position[1], u.Z = t.heightMode.value === P.ABSOLUTE ? e.value.position[2] : e.value.heightOffset);
790
790
  }
791
791
  function S() {
792
- N(), e.value && (w.distance = e.value.distance, w.fov = e.value.fov, w.heading = e.value.heading, w.pitch = e.value.pitch, w.showPrimitive = e.value.showPrimitive, V.value = e.value.type);
792
+ N(), e.value && (g.distance = e.value.distance, g.fov = e.value.fov, g.heading = e.value.heading, g.pitch = e.value.pitch, g.showPrimitive = e.value.showPrimitive, V.value = e.value.type);
793
793
  }
794
794
  qe(() => {
795
795
  e.value && s.value !== y.CREATE && S();
@@ -797,7 +797,7 @@ const Se = (i, t) => {
797
797
  e,
798
798
  () => {
799
799
  e.value && (C(), C = e.value.positionChanged.addEventListener(() => {
800
- N(), p();
800
+ N(), w();
801
801
  }));
802
802
  },
803
803
  { immediate: !0 }
@@ -809,11 +809,11 @@ const Se = (i, t) => {
809
809
  /** @type {import("@vcmap/core").CesiumMap} */
810
810
  (O = o.maps.activeMap.getScene()) == null ? void 0 : O.camera
811
811
  ), E = v == null ? void 0 : v.changed.addEventListener(() => {
812
- p();
812
+ w();
813
813
  });
814
- p = () => {
814
+ w = () => {
815
815
  var le;
816
- E == null || E(), h.value = null, (le = e.value) == null || le.activate(o.maps.activeMap), p = () => {
816
+ E == null || E(), h.value = null, (le = e.value) == null || le.activate(o.maps.activeMap), w = () => {
817
817
  };
818
818
  };
819
819
  }
@@ -826,17 +826,17 @@ const Se = (i, t) => {
826
826
  }
827
827
  );
828
828
  }), et(() => {
829
- C(), p(), l(), n.value || ((s.value === y.EDIT || s.value === y.MOVE) && e.value ? t.viewViewshed(e.value) : s.value === y.CREATE && t.stop()), c.value && (c.value.length > 1 ? t.setupMultiSelect() : c.value.length === 1 && e.value ? t.viewViewshed(e.value) : (
829
+ C(), w(), l(), n.value || ((s.value === y.EDIT || s.value === y.MOVE) && e.value ? t.viewViewshed(e.value) : s.value === y.CREATE && t.stop()), c.value && (c.value.length > 1 ? t.setupMultiSelect() : c.value.length === 1 && e.value ? t.viewViewshed(e.value) : (
830
830
  // when a persited viewshed is deselected, stops plugin
831
831
  !c.value.length && s.value === y.EDIT && t.stop(!1)
832
832
  ));
833
833
  }), S();
834
834
  function a(v, E) {
835
- p(), e.value && (w[v] = E, e.value[v] = E);
835
+ w(), e.value && (g[v] = E, e.value[v] = E);
836
836
  }
837
837
  const r = ve(() => {
838
838
  const v = [];
839
- return V.value === g.CONE && v.push({
839
+ return V.value === p.CONE && v.push({
840
840
  name: "jumpToViewpoint",
841
841
  title: h.value ? "viewshed.returnToViewpoint" : "viewshed.jumpToViewpoint",
842
842
  icon: "mdi-human-male",
@@ -857,7 +857,7 @@ const Se = (i, t) => {
857
857
  animate: !0
858
858
  // if not animate, async does not work and the cameraChanged listener is triggered immediately. alternatively set timeout
859
859
  })
860
- )), L()) : h.value && ((O = o.maps.activeMap) == null || O.gotoViewpoint(h.value), p());
860
+ )), L()) : h.value && ((O = o.maps.activeMap) == null || O.gotoViewpoint(h.value), w());
861
861
  }
862
862
  }), v.push({
863
863
  name: "moveViewshed",
@@ -873,7 +873,7 @@ const Se = (i, t) => {
873
873
  name: "showPrimitive",
874
874
  title: "viewshed.showPrimitive",
875
875
  icon: "mdi-eye",
876
- active: w.showPrimitive,
876
+ active: g.showPrimitive,
877
877
  callback() {
878
878
  this.active = !this.active, a("showPrimitive", this.active);
879
879
  }
@@ -882,7 +882,7 @@ const Se = (i, t) => {
882
882
  return {
883
883
  position: u,
884
884
  setPosition(v, E, T) {
885
- if (p(), !!e.value) {
885
+ if (w(), !!e.value) {
886
886
  if (T === 2 && t.heightMode.value === P.RELATIVE)
887
887
  e.value.heightOffset = Number(v);
888
888
  else {
@@ -892,14 +892,14 @@ const Se = (i, t) => {
892
892
  u[E] = Number(v);
893
893
  }
894
894
  },
895
- parameters: w,
895
+ parameters: g,
896
896
  setParameter: a,
897
897
  parameterRanges: Ft,
898
898
  ViewshedPluginModes: y,
899
899
  viewshedMode: s,
900
900
  currentIsPersisted: n,
901
901
  viewshedType: V,
902
- ViewshedTypes: g,
902
+ ViewshedTypes: p,
903
903
  HeightModes: P,
904
904
  heightMode: t.heightMode,
905
905
  TransformationMode: Be,
@@ -920,7 +920,7 @@ const Se = (i, t) => {
920
920
  class: "d-flex w-full justify-end px-2 pt-2 pb-1"
921
921
  };
922
922
  function Gt(i, t, o, e, s, n) {
923
- const d = b("VcsHelp"), l = b("v-row"), c = b("VcsFeatureTransforms"), C = b("VcsTextField"), u = b("v-col"), h = b("v-container"), p = b("VcsFormSection"), w = b("v-divider"), V = b("VcsLabel"), N = b("VcsSelect"), S = b("VcsSlider"), L = b("VcsFormButton");
923
+ const d = b("VcsHelp"), l = b("v-row"), c = b("VcsFeatureTransforms"), C = b("VcsTextField"), u = b("v-col"), h = b("v-container"), w = b("VcsFormSection"), g = b("v-divider"), V = b("VcsLabel"), N = b("VcsSelect"), S = b("VcsSlider"), L = b("VcsFormButton");
924
924
  return M(), B("div", null, [
925
925
  e.viewshedMode === e.ViewshedPluginModes.CREATE ? (M(), B("div", Wt, [
926
926
  e.viewshedType === e.ViewshedTypes.CONE ? (M(), D(d, { key: 0 }, {
@@ -944,7 +944,7 @@ function Gt(i, t, o, e, s, n) {
944
944
  _: 1
945
945
  /* STABLE */
946
946
  })) : $("v-if", !0)
947
- ])) : e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? (M(), D(p, {
947
+ ])) : e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? (M(), D(w, {
948
948
  key: 1,
949
949
  "header-actions": e.headerActions,
950
950
  heading: "viewshed.viewpoint",
@@ -1029,7 +1029,7 @@ function Gt(i, t, o, e, s, n) {
1029
1029
  _: 1
1030
1030
  /* STABLE */
1031
1031
  }, 8, ["header-actions"])) : $("v-if", !0),
1032
- m(w),
1032
+ m(g),
1033
1033
  m(h, { class: "px-1 py-0" }, {
1034
1034
  default: f(() => [
1035
1035
  m(l, { "no-gutters": "" }, {
@@ -1216,7 +1216,7 @@ function Gt(i, t, o, e, s, n) {
1216
1216
  _: 1
1217
1217
  /* STABLE */
1218
1218
  })) : $("v-if", !0),
1219
- m(w),
1219
+ m(g),
1220
1220
  e.viewshedMode === e.ViewshedPluginModes.EDIT || e.viewshedMode === e.ViewshedPluginModes.MOVE ? (M(), B("div", Ht, [
1221
1221
  m(L, {
1222
1222
  onClick: t[0] || (t[0] = (a) => e.addToMyWorkspace()),
@@ -1256,9 +1256,9 @@ function Gt(i, t, o, e, s, n) {
1256
1256
  ])) : $("v-if", !0)
1257
1257
  ]);
1258
1258
  }
1259
- const Kt = /* @__PURE__ */ Se(jt, [["render", Gt]]), j = "@vcmap/viewshed", Yt = "3.0.0", Xt = "^6.0", se = {
1260
- [g.CONE]: "$vcsViewshed",
1261
- [g.THREESIXTY]: "$vcsViewshedCone"
1259
+ const Kt = /* @__PURE__ */ Se(jt, [["render", Gt]]), j = "@vcmap/viewshed", Yt = "3.0.1", Xt = "^6.0", se = {
1260
+ [p.CONE]: "$vcsViewshed",
1261
+ [p.THREESIXTY]: "$vcsViewshedCone"
1262
1262
  };
1263
1263
  function Jt(i, t, o) {
1264
1264
  const e = U(), s = U(), n = `${o.id}-editor`, d = {
@@ -1274,19 +1274,16 @@ function Jt(i, t, o) {
1274
1274
  }
1275
1275
  };
1276
1276
  ht(t, o, {
1277
- editor: (p) => ({
1277
+ editor: (w) => ({
1278
1278
  ...d,
1279
1279
  props: {
1280
1280
  selection: o.selection,
1281
- getViewshed: () => o.collection.getByKey(p.name)
1281
+ getViewshed: () => o.collection.getByKey(w.name)
1282
1282
  }
1283
1283
  })
1284
1284
  });
1285
1285
  function l() {
1286
- i.currentViewshed.value && (s.value = se[i.currentViewshed.value.type], i.currentIsPersisted.value ? e.value = i.currentViewshed.value.properties.title : i.mode.value === y.CREATE ? e.value = [
1287
- "viewshed.create",
1288
- `viewshed.${i.currentViewshed.value.type}`
1289
- ] : e.value = [
1286
+ i.currentViewshed.value && (s.value = se[i.currentViewshed.value.type], i.currentIsPersisted.value ? e.value = i.currentViewshed.value.properties.title : i.mode.value === y.CREATE ? e.value = `viewshed.create.${i.currentViewshed.value.type}` : e.value = [
1290
1287
  "viewshed.temporary",
1291
1288
  `viewshed.${i.currentViewshed.value.type}`
1292
1289
  ]);
@@ -1302,10 +1299,10 @@ function Jt(i, t, o) {
1302
1299
  j
1303
1300
  ));
1304
1301
  }
1305
- const C = z(i.currentViewshed, (p) => {
1306
- p && c();
1307
- }), u = z(i.currentIsPersisted, (p) => {
1308
- p && l();
1302
+ const C = z(i.currentViewshed, (w) => {
1303
+ w && c();
1304
+ }), u = z(i.currentIsPersisted, (w) => {
1305
+ w && l();
1309
1306
  }), h = z(i.mode, () => {
1310
1307
  i.mode.value ? c() : t.windowManager.remove(n);
1311
1308
  });
@@ -1337,14 +1334,14 @@ function Zt(i, t, o, e) {
1337
1334
  const C = this.tools[this.currentIndex].name;
1338
1335
  t.createViewshed(C);
1339
1336
  },
1340
- tools: e.flatMap((c) => c === g.CONE ? {
1341
- name: g.CONE,
1342
- icon: se[g.CONE],
1343
- title: `viewshed.${g.CONE}`
1344
- } : c === g.THREESIXTY ? {
1345
- name: g.THREESIXTY,
1346
- icon: se[g.THREESIXTY],
1347
- title: `viewshed.${g.THREESIXTY}`
1337
+ tools: e.flatMap((c) => c === p.CONE ? {
1338
+ name: p.CONE,
1339
+ icon: se[p.CONE],
1340
+ title: `viewshed.create.${p.CONE}`
1341
+ } : c === p.THREESIXTY ? {
1342
+ name: p.THREESIXTY,
1343
+ icon: se[p.THREESIXTY],
1344
+ title: `viewshed.create.${p.THREESIXTY}`
1348
1345
  } : [])
1349
1346
  })
1350
1347
  }, n = z(t.mode, (c) => {
@@ -1367,7 +1364,7 @@ function Zt(i, t, o, e) {
1367
1364
  };
1368
1365
  }
1369
1366
  function qt(i, t, o, e) {
1370
- re(e, [Pt(g)]);
1367
+ re(e, [Pt(p)]);
1371
1368
  const { toolbox: s, destroy: n } = Zt(i, t, o, e), d = i.toolboxManager.add(s, o).id;
1372
1369
  return () => {
1373
1370
  i.toolboxManager.remove(d), n();
@@ -1418,10 +1415,10 @@ async function ei(i) {
1418
1415
  ),
1419
1416
  owner: j
1420
1417
  });
1421
- const n = (u, h, p) => {
1422
- p.title = u.properties.title, p.titleChanged = (w) => {
1423
- u.properties.title = w, p.title = w, t.raiseEvent({ item: u, title: w });
1424
- }, p.actions.push(
1418
+ const n = (u, h, w) => {
1419
+ w.title = u.properties.title, w.titleChanged = (g) => {
1420
+ u.properties.title = g, w.title = g, t.raiseEvent({ item: u, title: g });
1421
+ }, w.actions.push(
1425
1422
  q({
1426
1423
  name: "visibilityAction",
1427
1424
  icon: "$vcsCheckbox",
@@ -1448,7 +1445,7 @@ async function ei(i) {
1448
1445
  j
1449
1446
  ), { action: c, destroy: C } = gt(
1450
1447
  async (u) => {
1451
- const { vueI18n: h } = i, w = (await Promise.all(
1448
+ const { vueI18n: h } = i, g = (await Promise.all(
1452
1449
  u.map(async (S) => {
1453
1450
  const L = await S.text();
1454
1451
  try {
@@ -1463,7 +1460,7 @@ async function ei(i) {
1463
1460
  }
1464
1461
  return [];
1465
1462
  })
1466
- )).flat(), V = w.map((S) => s.collection.add(S)).filter((S) => S != null), N = w.length - V.length;
1463
+ )).flat(), V = g.map((S) => s.collection.add(S)).filter((S) => S != null), N = g.length - V.length;
1467
1464
  if (N > 0)
1468
1465
  return i.notifier.add({
1469
1466
  type: X.WARNING,
@@ -1497,14 +1494,14 @@ async function ei(i) {
1497
1494
  e.selection.value.length && (e.selection.value = []);
1498
1495
  },
1499
1496
  setVisibility(u, h) {
1500
- const p = e.items.value.find(
1501
- (w) => u === w.name
1497
+ const w = e.items.value.find(
1498
+ (g) => u === g.name
1502
1499
  );
1503
- if (p) {
1504
- const w = p.actions.find(
1500
+ if (w) {
1501
+ const g = w.actions.find(
1505
1502
  (V) => V.name === "visibilityAction"
1506
1503
  );
1507
- w && (w.icon = h ? "$vcsCheckboxChecked" : "$vcsCheckbox");
1504
+ g && (g.icon = h ? "$vcsCheckboxChecked" : "$vcsCheckbox");
1508
1505
  }
1509
1506
  },
1510
1507
  add(u) {
@@ -1530,7 +1527,7 @@ function J() {
1530
1527
  return {
1531
1528
  visibleColor: x.getDefaultOptions().visibleColor,
1532
1529
  shadowColor: x.getDefaultOptions().shadowColor,
1533
- tools: [...Object.values(g)]
1530
+ tools: [...Object.values(p)]
1534
1531
  };
1535
1532
  }
1536
1533
  const ti = {
@@ -1562,9 +1559,9 @@ const ti = {
1562
1559
  }
1563
1560
  return {
1564
1561
  localConfig: o,
1565
- ViewshedTypes: g,
1562
+ ViewshedTypes: p,
1566
1563
  apply: e,
1567
- toolItems: Object.values(g).map((s) => ({
1564
+ toolItems: Object.values(p).map((s) => ({
1568
1565
  value: s,
1569
1566
  title: `viewshed.${s}`
1570
1567
  }))
@@ -1572,10 +1569,10 @@ const ti = {
1572
1569
  }
1573
1570
  };
1574
1571
  function ii(i, t, o, e, s, n) {
1575
- const d = b("VcsLabel"), l = b("v-col"), c = b("VcsSelect"), C = b("v-row"), u = b("VColorPicker"), h = b("v-container"), p = b("VcsFormSection"), w = b("AbstractConfigEditor");
1576
- return M(), D(w, it({ onSubmit: e.apply }, { ...i.$attrs, ...i.$props }), {
1572
+ const d = b("VcsLabel"), l = b("v-col"), c = b("VcsSelect"), C = b("v-row"), u = b("VColorPicker"), h = b("v-container"), w = b("VcsFormSection"), g = b("AbstractConfigEditor");
1573
+ return M(), D(g, it({ onSubmit: e.apply }, { ...i.$attrs, ...i.$props }), {
1577
1574
  default: f(() => [
1578
- e.localConfig ? (M(), D(p, {
1575
+ e.localConfig ? (M(), D(w, {
1579
1576
  key: 0,
1580
1577
  heading: "viewshed.editor.general"
1581
1578
  }, {
@@ -1740,8 +1737,8 @@ function ui(i) {
1740
1737
  s,
1741
1738
  d.collectionComponent
1742
1739
  ), { activeMap: C } = s.maps;
1743
- function u(w) {
1744
- if (n != null && n.m && n.cv && w instanceof G) {
1740
+ function u(g) {
1741
+ if (n != null && n.m && n.cv && g instanceof G) {
1745
1742
  n.cv.properties.title && delete n.cv.properties.title;
1746
1743
  const V = new x(n.cv);
1747
1744
  n.m === y.VIEW ? t.viewViewshed(V) : t.editViewshed(V);
@@ -1749,13 +1746,13 @@ function ui(i) {
1749
1746
  }
1750
1747
  let h = !1;
1751
1748
  C && (h = !0, u(C));
1752
- const p = s.maps.mapActivated.addEventListener(
1753
- (w) => {
1754
- t.stop(), h || (u(w), h = !0);
1749
+ const w = s.maps.mapActivated.addEventListener(
1750
+ (g) => {
1751
+ t.stop(), h || (u(g), h = !0);
1755
1752
  }
1756
1753
  );
1757
1754
  e = () => {
1758
- p(), l(), c(), d.destroy(), t.destroy();
1755
+ w(), l(), c(), d.destroy(), t.destroy();
1759
1756
  };
1760
1757
  },
1761
1758
  /**
@@ -1790,7 +1787,8 @@ function ui(i) {
1790
1787
  component: oi,
1791
1788
  title: "viewshed.editor.title",
1792
1789
  infoUrlCallback: o == null ? void 0 : o.getHelpUrlCallback(
1793
- "/components/plugins/viewshedToolConfig.html"
1790
+ "/components/plugins/viewshedToolConfig.html",
1791
+ "app-configurator"
1794
1792
  )
1795
1793
  }
1796
1794
  ];
@@ -1812,9 +1810,12 @@ function ui(i) {
1812
1810
  absolute: "Absolute",
1813
1811
  new: "New",
1814
1812
  cancel: "Cancel",
1815
- [g.CONE]: "Cone viewshed analysis",
1816
- [g.THREESIXTY]: "360° viewshed analysis",
1817
- create: "Create",
1813
+ [p.CONE]: "Cone viewshed analysis",
1814
+ [p.THREESIXTY]: "360° viewshed analysis",
1815
+ create: {
1816
+ [p.CONE]: "Create cone viewshed analysis",
1817
+ [p.THREESIXTY]: "Create 360° viewshed analysis"
1818
+ },
1818
1819
  addToMyWorkspace: "Add to My Workspace",
1819
1820
  temporary: "Temporary",
1820
1821
  jumpToViewpoint: "Jump to viewpoint",
@@ -1847,9 +1848,12 @@ function ui(i) {
1847
1848
  absolute: "Absolut",
1848
1849
  new: "Neu",
1849
1850
  cancel: "Abbrechen",
1850
- [g.CONE]: "Sichtkegelanalyse",
1851
- [g.THREESIXTY]: "360° Sichtsanalyse",
1852
- create: "Erzeuge",
1851
+ [p.CONE]: "Sichtkegelanalyse",
1852
+ [p.THREESIXTY]: "360° Sichtsanalyse",
1853
+ create: {
1854
+ [p.CONE]: "Sichtkegelanalyse erstellen",
1855
+ [p.THREESIXTY]: "360° Sichtanalyse erstellen"
1856
+ },
1853
1857
  addToMyWorkspace: "Zu Mein Arbeitsbereich hinzufügen",
1854
1858
  temporary: "Temporäre",
1855
1859
  jumpToViewpoint: "Zu Standpunkt springen",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vcmap/viewshed",
3
- "version": "3.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "Tool to simulate a \"viewer\" and their field of vision from a certain standpoint in the map. It allows the user to see which areas and buildings can or can't be seen from a specific standpoint, regarding different viewing distances, viewers' sizes and orientations.Th",
5
5
  "type": "module",
6
6
  "main": "src/index.js",
@@ -55,13 +55,13 @@
55
55
  "vuetify": "^3.7.3"
56
56
  },
57
57
  "devDependencies": {
58
- "@vcmap/plugin-cli": "^4.0.0",
58
+ "@vcmap/plugin-cli": "^4.0.1",
59
59
  "@vcsuite/eslint-config": "^3.0.8",
60
- "@vitest/coverage-v8": "^2.0.1",
60
+ "@vitest/coverage-v8": "^2.1.3",
61
61
  "jest-canvas-mock": "^2.5.2",
62
62
  "jsdom": "^22.1.0",
63
63
  "resize-observer-polyfill": "^1.5.1",
64
- "vitest": "^2.0.1"
64
+ "vitest": "^2.1.3"
65
65
  },
66
66
  "dependencies": {
67
67
  "@vcsuite/check": "^2.1.0",
package/src/index.js CHANGED
@@ -166,6 +166,7 @@ export default function plugin(config) {
166
166
  title: 'viewshed.editor.title',
167
167
  infoUrlCallback: app?.getHelpUrlCallback(
168
168
  '/components/plugins/viewshedToolConfig.html',
169
+ 'app-configurator',
169
170
  ),
170
171
  },
171
172
  ];
@@ -189,7 +190,10 @@ export default function plugin(config) {
189
190
  cancel: 'Cancel',
190
191
  [ViewshedTypes.CONE]: 'Cone viewshed analysis',
191
192
  [ViewshedTypes.THREESIXTY]: '360° viewshed analysis',
192
- create: 'Create',
193
+ create: {
194
+ [ViewshedTypes.CONE]: 'Create cone viewshed analysis',
195
+ [ViewshedTypes.THREESIXTY]: 'Create 360° viewshed analysis',
196
+ },
193
197
  addToMyWorkspace: 'Add to My Workspace',
194
198
  temporary: 'Temporary',
195
199
  jumpToViewpoint: 'Jump to viewpoint',
@@ -226,7 +230,10 @@ export default function plugin(config) {
226
230
  cancel: 'Abbrechen',
227
231
  [ViewshedTypes.CONE]: 'Sichtkegelanalyse',
228
232
  [ViewshedTypes.THREESIXTY]: '360° Sichtsanalyse',
229
- create: 'Erzeuge',
233
+ create: {
234
+ [ViewshedTypes.CONE]: 'Sichtkegelanalyse erstellen',
235
+ [ViewshedTypes.THREESIXTY]: '360° Sichtanalyse erstellen',
236
+ },
230
237
  addToMyWorkspace: 'Zu Mein Arbeitsbereich hinzufügen',
231
238
  temporary: 'Temporäre',
232
239
  jumpToViewpoint: 'Zu Standpunkt springen',
@@ -53,13 +53,13 @@ function createViewshedToolbox(app, manager, name, tools) {
53
53
  return {
54
54
  name: ViewshedTypes.CONE,
55
55
  icon: ViewshedIcons[ViewshedTypes.CONE],
56
- title: `viewshed.${ViewshedTypes.CONE}`,
56
+ title: `viewshed.create.${ViewshedTypes.CONE}`,
57
57
  };
58
58
  } else if (tool === ViewshedTypes.THREESIXTY) {
59
59
  return {
60
60
  name: ViewshedTypes.THREESIXTY,
61
61
  icon: ViewshedIcons[ViewshedTypes.THREESIXTY],
62
- title: `viewshed.${ViewshedTypes.THREESIXTY}`,
62
+ title: `viewshed.create.${ViewshedTypes.THREESIXTY}`,
63
63
  };
64
64
  } else {
65
65
  return [];
@@ -61,10 +61,7 @@ export function setupViewshedWindow(manager, app, collectionComponent) {
61
61
  if (manager.currentIsPersisted.value) {
62
62
  headerTitle.value = manager.currentViewshed.value.properties.title;
63
63
  } else if (manager.mode.value === ViewshedPluginModes.CREATE) {
64
- headerTitle.value = [
65
- 'viewshed.create',
66
- `viewshed.${manager.currentViewshed.value.type}`,
67
- ];
64
+ headerTitle.value = `viewshed.create.${manager.currentViewshed.value.type}`;
68
65
  } else {
69
66
  headerTitle.value = [
70
67
  'viewshed.temporary',