@panoramax/web-viewer 5.3.0-develop-4143eb17 → 5.3.0-develop-921335ef

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.
@@ -9,7 +9,7 @@ import BasicStyles from "./Basic.css" with { type: "css" };
9
9
  document.adoptedStyleSheets.push(AtkinsonStyles);
10
10
  document.adoptedStyleSheets.push(BasicStyles);
11
11
 
12
- const __COMMIT_HASH__ = "4143eb1";
12
+ const __COMMIT_HASH__ = "921335e";
13
13
  const __PACKAGE_VERSION__ = "5.3.0";
14
14
  const __PACKAGE_ISSUES_URL__ = "https://gitlab.com/panoramax/clients/web-viewer/-/work_items";
15
15
 
@@ -471,7 +471,7 @@ export default class Map extends MapLibre {
471
471
  if(f.properties.best_item) {
472
472
  this._parent.select(null, f.properties.best_item);
473
473
  this._parent._setFocus?.("pic");
474
- } else {
474
+ } else if(this._parent.mapStyleComposer._getPanoramaxStyleVersion() !== 2) {
475
475
  this.flyTo({ center: e.lngLat, zoom: TILES_PICTURES_ZOOM-6 });
476
476
  }
477
477
  });
@@ -487,17 +487,18 @@ export default class Map extends MapLibre {
487
487
  */
488
488
  _attachPreviewToPictures(e, from) {
489
489
  let f = e.features.pop();
490
+ const picId = f.properties.best_item_relevance ? f.properties.best_item : f.properties.id;
490
491
  if(!f) {
491
492
  this._picPinMarker?.remove?.();
492
493
  return;
493
494
  }
494
495
  // eslint-disable-next-line eqeqeq
495
- else if(!f || (f.properties.id || f.properties.best_item) == this._picPopup._picId) { return; }
496
+ else if(!f || picId == this._picPopup._picId) { return; }
496
497
 
497
498
  clearTimeout(this._picPreviewTimer);
498
499
  clearTimeout(this._picDropPreviewTimer);
499
- this._picPopup._loading = f.properties.id;
500
- this._picPopup._picId = f.properties.id;
500
+ this._picPopup._loading = picId;
501
+ this._picPopup._picId = picId;
501
502
  delete this._picPopup._seqId;
502
503
 
503
504
  if(!e.lngLat) { e.lngLat = this.getCenter(); }
@@ -513,7 +514,7 @@ export default class Map extends MapLibre {
513
514
  if(from.includes("_pictures") && f.geometry.type === "Point") { // From picture hover
514
515
  picPreview = f;
515
516
  }
516
- else if(from.includes("_grid") && f.geometry.type === "Polygon") { // From Grid v2 hover
517
+ else if(from.includes("_grid") && f.geometry.type === "Polygon" && f.properties.best_item) { // From Grid v2 hover
517
518
  picPreview = {
518
519
  type: "Feature",
519
520
  geometry: { type: "Point", coordinates: f.geometry.coordinates[0][0] },
@@ -579,14 +580,14 @@ export default class Map extends MapLibre {
579
580
  }
580
581
 
581
582
  // Only show GIF loader if thumbnail is not in browser cache
582
- if(!picPreview && !this._picThumbUrl[f.properties.id]) {
583
+ if(!picPreview && !this._picThumbUrl[picId]) {
583
584
  this._picPopup.setDOMContent(getThumbGif(this._parent._t));
584
585
  }
585
586
 
586
587
  const displayThumb = thumbUrl => {
587
588
  if(this._options.preview !== "thumb") { return; }
588
589
 
589
- if(this._picPopup._loading === f.properties.id) {
590
+ if(this._picPopup._loading === picId) {
590
591
  if(thumbUrl) {
591
592
  let content = document.createElement("img");
592
593
  content.classList.add("pnx-map-thumb");
@@ -595,7 +596,7 @@ export default class Map extends MapLibre {
595
596
  img.src = thumbUrl;
596
597
 
597
598
  img.addEventListener("load", () => {
598
- if(this._picPopup._loading !== f.properties.id) { return; }
599
+ if(this._picPopup._loading !== picId) { return; }
599
600
 
600
601
  if(f.properties.hidden) {
601
602
  content.children[0].src = img.src;
@@ -623,17 +624,17 @@ export default class Map extends MapLibre {
623
624
  }
624
625
  };
625
626
 
626
- if(this._picPopup._loading !== f.properties.id) { return; }
627
+ if(this._picPopup._loading !== picId) { return; }
627
628
 
628
629
  // Hover on cached thumbnail
629
- if(this._picThumbUrl[picPreview?.properties?.id || f.properties.id]) {
630
- displayThumb(this._picThumbUrl[picPreview?.properties?.id || f.properties.id]);
630
+ if(this._picThumbUrl[picPreview?.properties?.id || picId]) {
631
+ displayThumb(this._picThumbUrl[picPreview?.properties?.id || picId]);
631
632
  }
632
633
  // Throttled call to API
633
634
  else {
634
635
  clearTimeout(this._picPreviewTimer);
635
636
  this._picPreviewTimer = setTimeout(() => {
636
- if(this._picPopup._loading !== f.properties.id) { return; }
637
+ if(this._picPopup._loading !== picId) { return; }
637
638
  if(this._options.preview !== "thumb") { return; }
638
639
  this._picPopup.setDOMContent(getThumbGif(this._parent._t));
639
640
 
@@ -652,7 +653,7 @@ export default class Map extends MapLibre {
652
653
  }
653
654
  // Hover on a sequence
654
655
  else if(from.includes("_sequences")) {
655
- this._getSequenceThumbURL(f.properties.id, thumbCoords).then(displayThumb);
656
+ this._getSequenceThumbURL(picId, thumbCoords).then(displayThumb);
656
657
  }
657
658
  }, 100);
658
659
  }
@@ -20,10 +20,10 @@
20
20
  null,
21
21
  "📡 O pellgargañ an hizivadennoù"
22
22
  ],
23
- "map_theme_age_4": "< 6 miz",
24
- "map_theme_age_3": "< 1 bloaz",
25
- "map_theme_age_2": "< 3 vloaz",
26
- "map_theme_age_1": "> 3 vloaz",
23
+ "map_theme_age_4": "- 6 miz",
24
+ "map_theme_age_3": "½ - 1 bloaz",
25
+ "map_theme_age_2": "1 - 3 vloaz",
26
+ "map_theme_age_1": "+ 3 vloaz",
27
27
  "error_click": "Kenderc'hel",
28
28
  "id": "iD",
29
29
  "josm": "JOSM",
@@ -50,7 +50,7 @@
50
50
  "share_page": "Liamm ar foto",
51
51
  "share_image": "Skeudenn HD",
52
52
  "panoramax": "Panoramax",
53
- "map_background": "Kartenn werc'h",
53
+ "map_background": "Drekleur",
54
54
  "map_background_streets": "Straedoù",
55
55
  "error": "Ur gudenn zo ganeomp…",
56
56
  "picture_360": "360°",
@@ -69,7 +69,8 @@
69
69
  "filter_locked": "Sil diweredekaet",
70
70
  "map_background_default": "Dre ziouer",
71
71
  "filter_source_local": "Ar servijer-mañ",
72
- "filter_source_world": "Bed a-bezh"
72
+ "filter_source_world": "Bed a-bezh",
73
+ "map_theme_default_3": "Mat"
73
74
  },
74
75
  "map": {
75
76
  "more_panoramax": "Gouzout hiroc'h diwar-benn Panoramax",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoramax/web-viewer",
3
- "version": "5.3.0-develop-4143eb17",
3
+ "version": "5.3.0-develop-921335ef",
4
4
  "description": "Panoramax web viewer for geolocated pictures",
5
5
  "main": "./build/cjs/index.js",
6
6
  "module": "./build/esm/index.js",