@panoramax/web-viewer 3.2.3-develop-367cb599 → 3.2.3-develop-33cd154c
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 +5 -0
- package/build/index.css +10 -10
- package/build/index.css.map +1 -1
- package/build/index.js +301 -296
- package/build/index.js.map +1 -1
- package/docs/03_URL_settings.md +1 -1
- package/package.json +11 -11
- package/src/components/ui/Photo.js +7 -4
- package/src/utils/InitParameters.js +1 -1
- package/tests/components/ui/Photo.test.js +2 -0
- package/tests/components/ui/__snapshots__/Photo.test.js.snap +5 -0
- package/tests/utils/InitParameters.test.js +6 -0
package/docs/03_URL_settings.md
CHANGED
|
@@ -36,7 +36,7 @@ Choose the allowed navigation between pictures, to eventually restrict what is v
|
|
|
36
36
|
|
|
37
37
|
- `nav=any` (or no value): no restriction in navigation (default)
|
|
38
38
|
- `nav=seq`: can only see pictures in same sequence
|
|
39
|
-
- `nav=none`: can only see current picture, no navigation to other picture allowed
|
|
39
|
+
- `nav=none/pic`: can only see current picture, no navigation to other picture allowed
|
|
40
40
|
|
|
41
41
|
## :material-image: Picture settings
|
|
42
42
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@panoramax/web-viewer",
|
|
3
|
-
"version": "3.2.3-develop-
|
|
3
|
+
"version": "3.2.3-develop-33cd154c",
|
|
4
4
|
"description": "Panoramax web viewer for geolocated pictures",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"author": "Panoramax team",
|
|
@@ -89,17 +89,17 @@
|
|
|
89
89
|
"workbox-webpack-plugin": "^6.5.4"
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
|
-
"@fortawesome/fontawesome-svg-core": "^6.
|
|
93
|
-
"@fortawesome/free-regular-svg-icons": "^6.
|
|
94
|
-
"@fortawesome/free-solid-svg-icons": "^6.
|
|
95
|
-
"@photo-sphere-viewer/core": "5.
|
|
96
|
-
"@photo-sphere-viewer/equirectangular-tiles-adapter": "5.
|
|
97
|
-
"@photo-sphere-viewer/gallery-plugin": "5.
|
|
98
|
-
"@photo-sphere-viewer/markers-plugin": "5.
|
|
99
|
-
"@photo-sphere-viewer/virtual-tour-plugin": "5.
|
|
92
|
+
"@fortawesome/fontawesome-svg-core": "^6.7.2",
|
|
93
|
+
"@fortawesome/free-regular-svg-icons": "^6.7.2",
|
|
94
|
+
"@fortawesome/free-solid-svg-icons": "^6.7.2",
|
|
95
|
+
"@photo-sphere-viewer/core": "5.12.1",
|
|
96
|
+
"@photo-sphere-viewer/equirectangular-tiles-adapter": "5.12.1",
|
|
97
|
+
"@photo-sphere-viewer/gallery-plugin": "5.12.1",
|
|
98
|
+
"@photo-sphere-viewer/markers-plugin": "5.12.1",
|
|
99
|
+
"@photo-sphere-viewer/virtual-tour-plugin": "5.12.1",
|
|
100
100
|
"lit": "^3.2.1",
|
|
101
|
-
"maplibre-gl": "^
|
|
102
|
-
"pmtiles": "^3.
|
|
101
|
+
"maplibre-gl": "^5.2.0",
|
|
102
|
+
"pmtiles": "^4.3.0",
|
|
103
103
|
"query-selector-shadow-dom": "^1.0.1"
|
|
104
104
|
},
|
|
105
105
|
"eslintConfig": {
|
|
@@ -205,8 +205,9 @@ export default class Photo extends PSViewer {
|
|
|
205
205
|
this.setOption("maxFov", Math.min(toNode.horizontalFov * 3/4, 90));
|
|
206
206
|
|
|
207
207
|
const centerNoAnim = {
|
|
208
|
+
showLoader: false,
|
|
209
|
+
effect: "none",
|
|
208
210
|
speed: 0,
|
|
209
|
-
fadeIn: false,
|
|
210
211
|
rotation: false,
|
|
211
212
|
rotateTo: { pitch: 0, yaw: 0 },
|
|
212
213
|
zoomTo: PSV_DEFAULT_ZOOM
|
|
@@ -228,7 +229,7 @@ export default class Photo extends PSViewer {
|
|
|
228
229
|
else {
|
|
229
230
|
nodeTransition = {
|
|
230
231
|
speed: animationDuration,
|
|
231
|
-
|
|
232
|
+
effect: following && animated ? "fade" : "none",
|
|
232
233
|
rotation: following && sameSequence && animated,
|
|
233
234
|
rotateTo: this.getPosition()
|
|
234
235
|
};
|
|
@@ -247,7 +248,7 @@ export default class Photo extends PSViewer {
|
|
|
247
248
|
const notTooMuchRotation = Math.abs(fromNodeHeading - toNodeHeading) <= Math.PI / 4;
|
|
248
249
|
nodeTransition = {
|
|
249
250
|
speed: animationDuration,
|
|
250
|
-
|
|
251
|
+
effect: following && notTooMuchRotation && animated ? "fade" : "none",
|
|
251
252
|
rotation: following && notTooMuchRotation && animated,
|
|
252
253
|
rotateTo: keepZoomPos ? this.getPosition() : { pitch: 0, yaw: 0 },
|
|
253
254
|
zoomTo: keepZoomPos ? this.getZoomLevel() : PSV_DEFAULT_ZOOM,
|
|
@@ -259,7 +260,7 @@ export default class Photo extends PSViewer {
|
|
|
259
260
|
}
|
|
260
261
|
}
|
|
261
262
|
|
|
262
|
-
if(nodeTransition.
|
|
263
|
+
if(nodeTransition.effect === "fade" && nodeTransition.speed >= 150) {
|
|
263
264
|
setTimeout(this._clearArrows, nodeTransition.speed-100);
|
|
264
265
|
}
|
|
265
266
|
else {
|
|
@@ -833,6 +834,7 @@ export default class Photo extends PSViewer {
|
|
|
833
834
|
* @memberof Panoramax.components.ui.Photo#
|
|
834
835
|
*/
|
|
835
836
|
setPicturesNavigation(pn) {
|
|
837
|
+
if(pn === "none") { pn = "pic"; }
|
|
836
838
|
this._picturesNavigation = pn;
|
|
837
839
|
|
|
838
840
|
/**
|
|
@@ -856,6 +858,7 @@ export default class Photo extends PSViewer {
|
|
|
856
858
|
case "seq":
|
|
857
859
|
return ["next", "prev"].includes(link.rel);
|
|
858
860
|
case "pic":
|
|
861
|
+
case "none":
|
|
859
862
|
return false;
|
|
860
863
|
case "any":
|
|
861
864
|
default:
|
|
@@ -284,7 +284,7 @@ export function alterPSVState(psv, params) {
|
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
// Change pictures navigation mode
|
|
287
|
-
if(["pic", "any", "seq"].includes(params.picturesNavigation)) {
|
|
287
|
+
if(["none", "pic", "any", "seq"].includes(params.picturesNavigation)) {
|
|
288
288
|
psv.setPicturesNavigation(params.picturesNavigation);
|
|
289
289
|
}
|
|
290
290
|
}
|
|
@@ -362,6 +362,8 @@ describe("setPicturesNavigation", () => {
|
|
|
362
362
|
expect(ph.getPicturesNavigation()).toBe("seq");
|
|
363
363
|
ph.setPicturesNavigation("any");
|
|
364
364
|
expect(ph.getPicturesNavigation()).toBe("any");
|
|
365
|
+
ph.setPicturesNavigation("none");
|
|
366
|
+
expect(ph.getPicturesNavigation()).toBe("pic");
|
|
365
367
|
expect(eventWatcher.mock.calls).toMatchSnapshot();
|
|
366
368
|
});
|
|
367
369
|
});
|
|
@@ -312,6 +312,12 @@ describe("alterPSVState", () => {
|
|
|
312
312
|
expect(psv.setPicturesNavigation).toHaveBeenCalledWith("pic");
|
|
313
313
|
});
|
|
314
314
|
|
|
315
|
+
it("should set pictures navigation mode when picturesNavigation=none", () => {
|
|
316
|
+
const params = { picturesNavigation: "none" };
|
|
317
|
+
alterPSVState(psv, params);
|
|
318
|
+
expect(psv.setPicturesNavigation).toHaveBeenCalledWith("none");
|
|
319
|
+
});
|
|
320
|
+
|
|
315
321
|
it("should not set pictures navigation mode when picturesNavigation param is invalid", () => {
|
|
316
322
|
const params = { picturesNavigation: "invalid" };
|
|
317
323
|
alterPSVState(psv, params);
|