@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.
@@ -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-367cb599",
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.6.0",
93
- "@fortawesome/free-regular-svg-icons": "^6.6.0",
94
- "@fortawesome/free-solid-svg-icons": "^6.6.0",
95
- "@photo-sphere-viewer/core": "5.11.0-beta.1",
96
- "@photo-sphere-viewer/equirectangular-tiles-adapter": "5.11.0-beta.1",
97
- "@photo-sphere-viewer/gallery-plugin": "5.11.0-beta.1",
98
- "@photo-sphere-viewer/markers-plugin": "5.11.0-beta.1",
99
- "@photo-sphere-viewer/virtual-tour-plugin": "5.11.0-beta.1",
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": "^4.7.1",
102
- "pmtiles": "^3.2.0",
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
- fadeIn: following && animated,
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
- fadeIn: following && notTooMuchRotation && animated,
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.fadeIn && nodeTransition.speed >= 150) {
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
  });
@@ -246,6 +246,11 @@ Array [
246
246
  "value": "any",
247
247
  },
248
248
  ],
249
+ Array [
250
+ Object {
251
+ "value": "pic",
252
+ },
253
+ ],
249
254
  ]
250
255
  `;
251
256
 
@@ -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);