@panoramax/web-viewer 3.2.1-develop-e904bbd4 → 3.2.1-develop-b82eccc7
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.js +2 -2
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/src/Editor.js +2 -0
- package/src/components/Loader.js +1 -0
- package/src/components/Map.js +8 -0
- package/src/components/Photo.js +1 -1
- package/src/translations/en.json +1 -0
- package/src/translations/fr.json +1 -0
- package/src/utils/Utils.js +1 -0
- package/src/viewer/Widgets.js +8 -2
- package/tests/__snapshots__/Editor.test.js.snap +2 -0
- package/tests/components/__snapshots__/Loader.test.js.snap +2 -2
- package/tests/components/__snapshots__/Photo.test.js.snap +2 -0
package/package.json
CHANGED
package/src/Editor.js
CHANGED
|
@@ -253,6 +253,7 @@ export default class Editor extends CoreView {
|
|
|
253
253
|
|
|
254
254
|
const imgBgStreets = document.createElement("img");
|
|
255
255
|
imgBgStreets.src = BackgroundStreets;
|
|
256
|
+
imgBgStreets.alt = "";
|
|
256
257
|
|
|
257
258
|
labelBgStreets.appendChild(imgBgStreets);
|
|
258
259
|
labelBgStreets.appendChild(document.createTextNode(this._t.gvs.map_background_streets));
|
|
@@ -272,6 +273,7 @@ export default class Editor extends CoreView {
|
|
|
272
273
|
|
|
273
274
|
const imgBgAerial = document.createElement("img");
|
|
274
275
|
imgBgAerial.src = BackgroundAerial;
|
|
276
|
+
imgBgAerial.alt = "";
|
|
275
277
|
|
|
276
278
|
labelBgAerial.appendChild(imgBgAerial);
|
|
277
279
|
labelBgAerial.appendChild(document.createTextNode(this._t.gvs.map_background_aerial));
|
package/src/components/Loader.js
CHANGED
package/src/components/Map.js
CHANGED
|
@@ -57,6 +57,8 @@ export default class Map extends maplibregl.Map {
|
|
|
57
57
|
attributionControl: false,
|
|
58
58
|
dragRotate: false,
|
|
59
59
|
pitchWithRotate: false,
|
|
60
|
+
touchZoomRotate: true,
|
|
61
|
+
touchPitch: false,
|
|
60
62
|
preserveDrawingBuffer: !parent.isWidthSmall(),
|
|
61
63
|
transformRequest: parent._api._getMapRequestTransform(),
|
|
62
64
|
locale: parent._t.maplibre,
|
|
@@ -68,6 +70,11 @@ export default class Map extends maplibregl.Map {
|
|
|
68
70
|
this._options = options;
|
|
69
71
|
this.getContainer().classList.add("gvs-map");
|
|
70
72
|
|
|
73
|
+
// Disable touch rotate
|
|
74
|
+
if(options.touchZoomRotate === undefined) {
|
|
75
|
+
this?.touchZoomRotate?.disableRotation();
|
|
76
|
+
}
|
|
77
|
+
|
|
71
78
|
// Handle raster source
|
|
72
79
|
if(this._options.raster) {
|
|
73
80
|
this._options.background = this._options.background || "streets";
|
|
@@ -786,6 +793,7 @@ export default class Map extends maplibregl.Map {
|
|
|
786
793
|
_getPictureMarker(selected = true) {
|
|
787
794
|
const img = document.createElement("img");
|
|
788
795
|
img.src = selected ? MarkerSelectedSVG : MarkerBaseSVG;
|
|
796
|
+
img.alt = "";
|
|
789
797
|
return new maplibregl.Marker({
|
|
790
798
|
element: img
|
|
791
799
|
});
|
package/src/components/Photo.js
CHANGED
|
@@ -678,7 +678,7 @@ export default class Photo extends PSViewer {
|
|
|
678
678
|
else {
|
|
679
679
|
console.error(e);
|
|
680
680
|
this.overlay.show({
|
|
681
|
-
image: `<img style="width: 200px" src="${LogoDead}" />`,
|
|
681
|
+
image: `<img style="width: 200px" src="${LogoDead}" alt="" />`,
|
|
682
682
|
title: this._parent._t.gvs.error,
|
|
683
683
|
text: label + "<br />" + this._parent._t.gvs.error_click,
|
|
684
684
|
dissmisable,
|
package/src/translations/en.json
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"show_psv": "Show the picture viewer",
|
|
23
23
|
"show_map": "Show the map",
|
|
24
24
|
"minimize": "Hide this widget, you can show it again using button in bottom left corner",
|
|
25
|
+
"minimize_short": "Hide",
|
|
25
26
|
"options": "Options",
|
|
26
27
|
"filters": "Filters",
|
|
27
28
|
"layers": "Layers",
|
package/src/translations/fr.json
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"show_psv": "Afficher la visionneuse de photos",
|
|
23
23
|
"show_map": "Afficher la carte",
|
|
24
24
|
"minimize": "Masquer ce widget, vous pouvez l'afficher de nouveau grâce au bouton dans le coin en bas à gauche",
|
|
25
|
+
"minimize_short": "Masquer",
|
|
25
26
|
"options": "Options",
|
|
26
27
|
"filters": "Filtres",
|
|
27
28
|
"layers": "Calques",
|
package/src/utils/Utils.js
CHANGED
package/src/viewer/Widgets.js
CHANGED
|
@@ -731,6 +731,9 @@ export default class Widgets {
|
|
|
731
731
|
_initWidgetMiniActions() {
|
|
732
732
|
// Mini widget expand
|
|
733
733
|
const imgExpand = document.createElement("img");
|
|
734
|
+
imgExpand.alt = "";
|
|
735
|
+
imgExpand.height = 120;
|
|
736
|
+
imgExpand.draggable = false;
|
|
734
737
|
imgExpand.src = SwitchBig;
|
|
735
738
|
const lblExpand = document.createElement("span");
|
|
736
739
|
lblExpand.classList.add("gvs-mobile-hidden");
|
|
@@ -744,6 +747,9 @@ export default class Widgets {
|
|
|
744
747
|
|
|
745
748
|
// Mini widget hide
|
|
746
749
|
const imgReduce = document.createElement("img");
|
|
750
|
+
imgReduce.alt = this._t.gvs.minimize_short;
|
|
751
|
+
imgReduce.height = 120;
|
|
752
|
+
imgReduce.draggable = false;
|
|
747
753
|
imgReduce.src = SwitchMini;
|
|
748
754
|
const btnHide = createButton("gvs-mini-hide", imgReduce, this._t.gvs.minimize, ["gvs-only-mini", "gvs-print-hidden"]);
|
|
749
755
|
this._corners["mini-bottom-left"].appendChild(btnHide);
|
|
@@ -874,12 +880,12 @@ export default class Widgets {
|
|
|
874
880
|
<div id="gvs-map-bg" class="gvs-input-group">
|
|
875
881
|
<input type="radio" id="gvs-map-bg-streets" name="gvs-map-bg" value="streets" />
|
|
876
882
|
<label for="gvs-map-bg-streets">
|
|
877
|
-
<img id="gvs-map-bg-streets-img" />
|
|
883
|
+
<img id="gvs-map-bg-streets-img" alt="" />
|
|
878
884
|
${this._t.gvs.map_background_streets}
|
|
879
885
|
</label>
|
|
880
886
|
<input type="radio" id="gvs-map-bg-aerial" name="gvs-map-bg" value="aerial" />
|
|
881
887
|
<label for="gvs-map-bg-aerial">
|
|
882
|
-
<img id="gvs-map-bg-aerial-img" />
|
|
888
|
+
<img id="gvs-map-bg-aerial-img" alt="" />
|
|
883
889
|
${this._t.gvs.map_background_aerial}
|
|
884
890
|
</label>
|
|
885
891
|
</div>`;
|
|
@@ -16,6 +16,7 @@ exports[`_addMapBackgroundWidget works 1`] = `
|
|
|
16
16
|
for="gvs-map-bg-streets"
|
|
17
17
|
>
|
|
18
18
|
<img
|
|
19
|
+
alt=""
|
|
19
20
|
src="bg_streets.jpg"
|
|
20
21
|
/>
|
|
21
22
|
Streets
|
|
@@ -30,6 +31,7 @@ exports[`_addMapBackgroundWidget works 1`] = `
|
|
|
30
31
|
for="gvs-map-bg-aerial"
|
|
31
32
|
>
|
|
32
33
|
<img
|
|
34
|
+
alt=""
|
|
33
35
|
src="bg_aerial.jpg"
|
|
34
36
|
/>
|
|
35
37
|
Aerial
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
2
|
|
|
3
|
-
exports[`constructor works 1`] = `"<img src=\\"marker.svg\\" title=\\"undefined\\" class=\\"gvs-loader-img\\"><div><span>Loading...</span></div>"`;
|
|
3
|
+
exports[`constructor works 1`] = `"<img src=\\"marker.svg\\" alt=\\"\\" title=\\"undefined\\" class=\\"gvs-loader-img\\"><div><span>Loading...</span></div>"`;
|
|
4
4
|
|
|
5
5
|
exports[`dismiss works when no error set 1`] = `
|
|
6
6
|
Array [
|
|
@@ -12,4 +12,4 @@ Array [
|
|
|
12
12
|
]
|
|
13
13
|
`;
|
|
14
14
|
|
|
15
|
-
exports[`dismiss works with error set 1`] = `"<img src=\\"logo_dead.svg\\" title=\\"undefined\\" class=\\"gvs-loader-img\\" style=\\"width: 200px; animation: unset;\\"><div>undefined<br>Oops it's broken<br><small>undefined</small></div>"`;
|
|
15
|
+
exports[`dismiss works with error set 1`] = `"<img src=\\"logo_dead.svg\\" alt=\\"\\" title=\\"undefined\\" class=\\"gvs-loader-img\\" style=\\"width: 200px; animation: unset;\\"><div>undefined<br>Oops it's broken<br><small>undefined</small></div>"`;
|
|
@@ -19,6 +19,7 @@ Object {
|
|
|
19
19
|
Object {
|
|
20
20
|
"arrowStyle": Object {
|
|
21
21
|
"element": <img
|
|
22
|
+
alt=""
|
|
22
23
|
src="arrow_triangle.svg"
|
|
23
24
|
/>,
|
|
24
25
|
"size": Object {
|
|
@@ -38,6 +39,7 @@ Object {
|
|
|
38
39
|
Object {
|
|
39
40
|
"arrowStyle": Object {
|
|
40
41
|
"element": <img
|
|
42
|
+
alt=""
|
|
41
43
|
src="arrow_triangle.svg"
|
|
42
44
|
/>,
|
|
43
45
|
"size": Object {
|