@panoramax/web-viewer 4.3.1-develop-78b79ba1 → 4.3.1-develop-39b43404
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 +4 -0
- package/build/index.js +9 -5
- package/build/index.js.map +1 -1
- package/build/photoviewer.js +8 -4
- package/build/photoviewer.js.map +1 -1
- package/package.json +1 -1
- package/src/components/core/PhotoViewer.js +7 -0
- package/src/components/layout/CorneredGrid.js +9 -4
- package/src/components/ui/Map.js +10 -0
package/package.json
CHANGED
|
@@ -378,6 +378,13 @@ export default class PhotoViewer extends Basic {
|
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
});
|
|
381
|
+
this.psvContainer.addEventListener("mousemove", () => {
|
|
382
|
+
if(this.grid._hidden) {
|
|
383
|
+
clearTimeout(this._gridFocus);
|
|
384
|
+
this.grid.toggleAway(true);
|
|
385
|
+
this.classList.remove("pnx-grid-toggled");
|
|
386
|
+
}
|
|
387
|
+
});
|
|
381
388
|
}
|
|
382
389
|
catch(e) {
|
|
383
390
|
let err = !PSSystem.isWebGLSupported ? this._t.pnx.error_webgl : this._t.pnx.error_psv;
|
|
@@ -54,8 +54,12 @@ export default class CorneredGrid extends LitElement {
|
|
|
54
54
|
|
|
55
55
|
.row.bottom { align-items: flex-end; }
|
|
56
56
|
|
|
57
|
-
.row.top.toggled { margin: -
|
|
58
|
-
.row.bottom.toggled { margin:
|
|
57
|
+
.row.top.toggled { margin: -100% 0 200% 0; }
|
|
58
|
+
.row.bottom.toggled { margin: 200% 0 -100% 0; }
|
|
59
|
+
@media screen and (min-width: 576px) {
|
|
60
|
+
.row.top.toggled { margin: -50% 0 100% 0; }
|
|
61
|
+
.row.bottom.toggled { margin: 100% 0 -50% 0; }
|
|
62
|
+
}
|
|
59
63
|
|
|
60
64
|
.corner {
|
|
61
65
|
position: relative;
|
|
@@ -94,10 +98,11 @@ export default class CorneredGrid extends LitElement {
|
|
|
94
98
|
|
|
95
99
|
/**
|
|
96
100
|
* Make all overlay components go away smoothly (one-click "focus")
|
|
101
|
+
* @param {boolean} [newState] True to make widgets visible, false to hide, undefined to invert
|
|
97
102
|
* @returns {boolean} True if widgets are hidden
|
|
98
103
|
*/
|
|
99
|
-
toggleAway() {
|
|
100
|
-
this._hidden = !this._hidden;
|
|
104
|
+
toggleAway(newState) {
|
|
105
|
+
this._hidden = newState === null || newState === undefined ? !this._hidden : !newState;
|
|
101
106
|
return this._hidden;
|
|
102
107
|
}
|
|
103
108
|
|
package/src/components/ui/Map.js
CHANGED
|
@@ -600,6 +600,16 @@ export default class Map extends maplibregl.Map {
|
|
|
600
600
|
}
|
|
601
601
|
}
|
|
602
602
|
});
|
|
603
|
+
|
|
604
|
+
// Untoggle away widgets
|
|
605
|
+
const untoggleGridWidgets = () => {
|
|
606
|
+
if(this._parent.isMapWide?.() && this._parent?.grid?._hidden) {
|
|
607
|
+
clearTimeout(this._gridFocus);
|
|
608
|
+
this._parent.grid.toggleAway(true);
|
|
609
|
+
}
|
|
610
|
+
};
|
|
611
|
+
this.on("mousemove", untoggleGridWidgets);
|
|
612
|
+
this.on("touchmove", untoggleGridWidgets);
|
|
603
613
|
}
|
|
604
614
|
|
|
605
615
|
/**
|