@mappedin/viewer 0.34.1-fbe5887.0 → 0.35.0
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.35.0](https://github.com/MappedIn/viewer/compare/viewer-v0.34.0...viewer-v0.35.0) (2025-02-06)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **SRV-1989:** kiosk mode ([#413](https://github.com/MappedIn/viewer/issues/413)) ([d46a755](https://github.com/MappedIn/viewer/commit/d46a75536e0699693ab20a4a2e6b54d2d8ec6025))
|
|
9
|
+
* **SRV-1989:** support pitch and bearing router params ([#415](https://github.com/MappedIn/viewer/issues/415)) ([9364eae](https://github.com/MappedIn/viewer/commit/9364eae178d5d8bae748b44044b91511e034d02e))
|
|
10
|
+
* **SRV-2002:** allow annotations to collide and add a button to force the old behaviour ([#419](https://github.com/MappedIn/viewer/issues/419)) ([9c30bc2](https://github.com/MappedIn/viewer/commit/9c30bc203b226327cd33e42d5b88fb9ff7b3012d))
|
|
11
|
+
* **SRV-2007:** show mini UI in very small frames ([#424](https://github.com/MappedIn/viewer/issues/424)) ([72880ae](https://github.com/MappedIn/viewer/commit/72880ae5c045896af24b1a2ba0bd4c2efde58e03))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
### Bug Fixes
|
|
15
|
+
|
|
16
|
+
* **SRV-1935:** use natural bearing from MVF ([#425](https://github.com/MappedIn/viewer/issues/425)) ([677be5d](https://github.com/MappedIn/viewer/commit/677be5d3008057862a529fa54ee93ebaa7f0abc0))
|
|
17
|
+
* **SRV-1989:** show kiosk timeout when camera is moved ([#414](https://github.com/MappedIn/viewer/issues/414)) ([8eeef50](https://github.com/MappedIn/viewer/commit/8eeef5029d445b069501f908fa47283ae1a808cf))
|
|
18
|
+
* **SRV-2001:** trim whitespace from names ([#420](https://github.com/MappedIn/viewer/issues/420)) ([884fb9d](https://github.com/MappedIn/viewer/commit/884fb9d4fbf6c3ec318ab757381c9066671984b9))
|
|
19
|
+
* **SRV-2002:** remove exit connection arrow and improve location markers collision ([#418](https://github.com/MappedIn/viewer/issues/418)) ([9dd7a4a](https://github.com/MappedIn/viewer/commit/9dd7a4ada98774f460b34d6ee602454a7d51558c))
|
|
20
|
+
* **SRV-2003:** do not refocus on floor change and update camera elevation in multi-floor view ([#422](https://github.com/MappedIn/viewer/issues/422)) ([4eb061a](https://github.com/MappedIn/viewer/commit/4eb061a21292e220cab3967859f4998b6205e96b))
|
|
21
|
+
* **SRV-2006:** update image proxy options and proxy full screen images ([#423](https://github.com/MappedIn/viewer/issues/423)) ([fbe5887](https://github.com/MappedIn/viewer/commit/fbe58874f6a41c031b74084f01b306e0f12255ea))
|
|
22
|
+
* **SRV-2010:** don't reset rotation all the time ([#426](https://github.com/MappedIn/viewer/issues/426)) ([c4a7ae3](https://github.com/MappedIn/viewer/commit/c4a7ae374f14a28c7fc64ca438bf5257df861e88))
|
|
23
|
+
|
|
3
24
|
## [0.34.0](https://github.com/MappedIn/viewer/compare/viewer-v0.33.1...viewer-v0.34.0) (2025-01-30)
|
|
4
25
|
|
|
5
26
|
|
package/dist/index.js
CHANGED
|
@@ -17097,7 +17097,7 @@ const $n2 = function() {
|
|
|
17097
17097
|
const e = Hg(), [t, r] = i;
|
|
17098
17098
|
e.capture(t, r);
|
|
17099
17099
|
}, Nn2 = (i = {}) => {
|
|
17100
|
-
const e = "
|
|
17100
|
+
const e = "phc_sRrjUwz9zicl4GeXtSnwcuKMr50SB76ma6NVi6zlPou", t = "https://ph-api.mappedin.com";
|
|
17101
17101
|
gN2(i.captureEnabled ?? !0);
|
|
17102
17102
|
const r = Hg();
|
|
17103
17103
|
if (!r.__loaded && e != null && t != null) {
|
|
@@ -72235,7 +72235,7 @@ class f6e {
|
|
|
72235
72235
|
return typeof e == "function" ? e() : (this.share(this.rootStore.getShareableUrl()), !0);
|
|
72236
72236
|
}
|
|
72237
72237
|
handleAppTimeout() {
|
|
72238
|
-
this.rootStore.isKioskModeEnabled && (this.rootStore.setState(v0.START), this.rootStore.setSelectedPlaces(void 0), this.setSearchQuery(""), this.rootStore.mapStore.camera.resetZoom());
|
|
72238
|
+
this.rootStore.isKioskModeEnabled && (this.rootStore.setState(v0.START), this.rootStore.setSelectedPlaces(void 0), this.setSearchQuery(""), this.rootStore.mapStore.camera.resetZoom(!0));
|
|
72239
72239
|
}
|
|
72240
72240
|
cleanup() {
|
|
72241
72241
|
document.removeEventListener("keydown", this.handleDocumentKeyDown);
|
|
@@ -75699,7 +75699,7 @@ const r9e = (i, e) => (Y4 != null || (Fp == null && globalThis.OffscreenCanvas !
|
|
|
75699
75699
|
const r = {
|
|
75700
75700
|
fit: "fit",
|
|
75701
75701
|
...t
|
|
75702
|
-
}, n = "https://image-proxy
|
|
75702
|
+
}, n = "https://image-proxy.mappedin.com", a = s9e(e, r.fit), s = encodeURIComponent(i);
|
|
75703
75703
|
return `${n}/resize:${r.fit}:${a}:${a}:0/format:webp/max_bytes:5000000/plain/${s}`.replaceAll(/\/+/g, "/").replace("https:/", "https://").replace("http:/", "http://");
|
|
75704
75704
|
}, se2 = re.div`
|
|
75705
75705
|
display: flex;
|
|
@@ -76576,7 +76576,7 @@ class M9e {
|
|
|
76576
76576
|
), this.reactionDisposers.push(
|
|
76577
76577
|
oi(
|
|
76578
76578
|
() => this.rootStore.mapStore.initialized,
|
|
76579
|
-
() => this.refocusCamera(!0)
|
|
76579
|
+
() => this.refocusCamera(!0, !0)
|
|
76580
76580
|
)
|
|
76581
76581
|
), this.reactionDisposers.push(
|
|
76582
76582
|
oi(
|
|
@@ -76722,16 +76722,16 @@ class M9e {
|
|
|
76722
76722
|
const e = this.getCoordinateFromScreenCenter(0, Y_);
|
|
76723
76723
|
await this.mapStore.mapView.Camera.animateTo({ center: e }, pl);
|
|
76724
76724
|
}
|
|
76725
|
-
async resetZoom() {
|
|
76725
|
+
async resetZoom(e = !1) {
|
|
76726
76726
|
if (this.mapStore.mapView == null || this.rootStore.currentFloor == null)
|
|
76727
76727
|
return;
|
|
76728
|
-
const
|
|
76728
|
+
const t = performance.now();
|
|
76729
76729
|
await this.focusOn(this.rootStore.currentFloor, {
|
|
76730
76730
|
// Always zoom in as much as possible when resetting the camera
|
|
76731
76731
|
maxZoomLevel: void 0,
|
|
76732
|
-
pitch: this.rootStore.uiStore.theme.map.initialPitch,
|
|
76733
|
-
bearing: this.rootStore.uiStore.theme.map.initialBearing
|
|
76734
|
-
}), r0.log("Computed zoom for current floor in ", performance.now() -
|
|
76732
|
+
pitch: e ? this.rootStore.uiStore.theme.map.initialPitch : void 0,
|
|
76733
|
+
bearing: e ? this.rootStore.uiStore.theme.map.initialBearing : void 0
|
|
76734
|
+
}), r0.log("Computed zoom for current floor in ", performance.now() - t, "ms"), Ro(() => {
|
|
76735
76735
|
this.mapStore.mapView != null && this.rootStore.currentFloor != null && (this.defaultCameraByFloorId[this.rootStore.currentFloor.id] = {
|
|
76736
76736
|
center: this.mapStore.mapView.Camera.center,
|
|
76737
76737
|
zoomLevel: this.mapStore.mapView.Camera.zoomLevel,
|
|
@@ -76760,44 +76760,44 @@ class M9e {
|
|
|
76760
76760
|
* Refocus the camera on the current floor. This function will figure out whether to focus on a place
|
|
76761
76761
|
* or path. Optionally, you can pass in `resetZoom` to reset the zoom if there is nothing to focus.
|
|
76762
76762
|
*/
|
|
76763
|
-
refocusCamera(e = !1) {
|
|
76763
|
+
refocusCamera(e = !1, t = !1) {
|
|
76764
76764
|
if (this.mapStore.mapView == null || !this.mapStore.initialized)
|
|
76765
76765
|
return;
|
|
76766
|
-
const
|
|
76767
|
-
e && this.resetZoom();
|
|
76766
|
+
const r = () => {
|
|
76767
|
+
e && this.resetZoom(t);
|
|
76768
76768
|
};
|
|
76769
76769
|
switch (this.rootStore.state) {
|
|
76770
76770
|
case v0.START:
|
|
76771
76771
|
{
|
|
76772
76772
|
if (this.rootStore.selectedPlaces != null && this.rootStore.currentFloor != null && this.rootStore.selectedPlaces.some(
|
|
76773
|
-
(
|
|
76773
|
+
(a) => this.rootStore.isPlaceOnFloor(a, this.rootStore.currentFloor)
|
|
76774
76774
|
)) {
|
|
76775
76775
|
if (this.rootStore.selectedPlaces == null)
|
|
76776
76776
|
throw new Error("Selected location is null");
|
|
76777
76777
|
this.focusOn(this.rootStore.selectedPlaces);
|
|
76778
76778
|
return;
|
|
76779
76779
|
}
|
|
76780
|
-
|
|
76780
|
+
r();
|
|
76781
76781
|
}
|
|
76782
76782
|
break;
|
|
76783
76783
|
case v0.DIRECTIONS: {
|
|
76784
76784
|
if (this.rootStore.currentFloor == null || this.mapStore.directions.directions == null)
|
|
76785
76785
|
return;
|
|
76786
76786
|
if (this.mapStore.directions.directions.distance === 0 && this.rootStore.selectedPlaces != null && this.rootStore.departures != null) {
|
|
76787
|
-
const
|
|
76788
|
-
this.focusOn(
|
|
76787
|
+
const n = [...this.rootStore.selectedPlaces, ...this.rootStore.departures];
|
|
76788
|
+
this.focusOn(n);
|
|
76789
76789
|
return;
|
|
76790
76790
|
}
|
|
76791
76791
|
if (!this.mapStore.directions.floorsInDirections.includes(this.rootStore.currentFloor)) {
|
|
76792
|
-
|
|
76792
|
+
r();
|
|
76793
76793
|
return;
|
|
76794
76794
|
}
|
|
76795
76795
|
setTimeout(() => {
|
|
76796
76796
|
this.mapStore.directions.directions != null && this.focusOn(
|
|
76797
76797
|
this.mapStore.directions.directions.coordinates.filter(
|
|
76798
|
-
(
|
|
76799
|
-
var
|
|
76800
|
-
return
|
|
76798
|
+
(n) => {
|
|
76799
|
+
var a;
|
|
76800
|
+
return n.floorId === ((a = this.rootStore.currentFloor) == null ? void 0 : a.id);
|
|
76801
76801
|
}
|
|
76802
76802
|
)
|
|
76803
76803
|
);
|
|
@@ -77188,7 +77188,7 @@ class P9e {
|
|
|
77188
77188
|
}
|
|
77189
77189
|
}
|
|
77190
77190
|
if (t)
|
|
77191
|
-
return this.camera.resetZoom(), !0;
|
|
77191
|
+
return this.camera.resetZoom(!1), !0;
|
|
77192
77192
|
if (r != null)
|
|
77193
77193
|
return this.handleClickEventForPlace(r);
|
|
77194
77194
|
}
|
|
@@ -77261,7 +77261,7 @@ class P9e {
|
|
|
77261
77261
|
}
|
|
77262
77262
|
async init(e) {
|
|
77263
77263
|
this.container = e;
|
|
77264
|
-
const t = this.rootStore.startupOptions.outdoorMapsKey ?? "
|
|
77264
|
+
const t = this.rootStore.startupOptions.outdoorMapsKey ?? "zixaliyV5cGjHU", r = {
|
|
77265
77265
|
auto: !1,
|
|
77266
77266
|
initialFloor: this.rootStore.currentFloor,
|
|
77267
77267
|
watermark: this.getWatermarkOptions(),
|
|
@@ -97226,9 +97226,9 @@ const mye = ({ color: i = Hl.color, changeFrequency: e = Hl.changeFrequency, rad
|
|
|
97226
97226
|
zoomControlsVisible: e.zoomControlsVisible,
|
|
97227
97227
|
tiltControlsVisible: e.tiltControlsVisible,
|
|
97228
97228
|
onTiltChange: i.mapStore.camera.tiltCamera,
|
|
97229
|
-
onZoomInClick: i.mapStore.camera.zoomIn,
|
|
97230
|
-
onZoomOutClick: i.mapStore.camera.zoomOut,
|
|
97231
|
-
onZoomAllClick: i.mapStore.camera.resetZoom
|
|
97229
|
+
onZoomInClick: () => i.mapStore.camera.zoomIn(),
|
|
97230
|
+
onZoomOutClick: () => i.mapStore.camera.zoomOut(),
|
|
97231
|
+
onZoomAllClick: () => i.mapStore.camera.resetZoom()
|
|
97232
97232
|
}
|
|
97233
97233
|
)
|
|
97234
97234
|
]
|
|
@@ -97660,9 +97660,9 @@ const mye = ({ color: i = Hl.color, changeFrequency: e = Hl.changeFrequency, rad
|
|
|
97660
97660
|
zoomControlsVisible: e.zoomControlsVisible,
|
|
97661
97661
|
tiltControlsVisible: !1,
|
|
97662
97662
|
onTiltChange: i.mapStore.camera.tiltCamera,
|
|
97663
|
-
onZoomInClick: i.mapStore.camera.zoomIn,
|
|
97664
|
-
onZoomOutClick: i.mapStore.camera.zoomOut,
|
|
97665
|
-
onZoomAllClick: i.mapStore.camera.resetZoom
|
|
97663
|
+
onZoomInClick: () => i.mapStore.camera.zoomIn(),
|
|
97664
|
+
onZoomOutClick: () => i.mapStore.camera.zoomOut(),
|
|
97665
|
+
onZoomAllClick: () => i.mapStore.camera.resetZoom()
|
|
97666
97666
|
}
|
|
97667
97667
|
) : null })
|
|
97668
97668
|
] }),
|
|
@@ -97686,7 +97686,7 @@ const mye = ({ color: i = Hl.color, changeFrequency: e = Hl.changeFrequency, rad
|
|
|
97686
97686
|
] });
|
|
97687
97687
|
}), QD2 = () => {
|
|
97688
97688
|
let i = document.querySelector("meta[name=app-version]");
|
|
97689
|
-
i == null && (i = document.createElement("meta"), i.name = "app-version", document.head.appendChild(i)), i.content = "0.
|
|
97689
|
+
i == null && (i = document.createElement("meta"), i.name = "app-version", document.head.appendChild(i)), i.content = "0.35.0";
|
|
97690
97690
|
let e = document.querySelector("meta[name=viewport]");
|
|
97691
97691
|
e == null && (e = document.createElement("meta"), e.name = "viewport", document.head.appendChild(e)), e.content = "width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no";
|
|
97692
97692
|
}, eT2 = (i) => {
|