@panoramax/web-viewer 3.1.1-develop-4243d3f4 → 3.1.1-develop-2701b828
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 +3 -0
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/src/utils/Exif.js +2 -2
- package/src/utils/Map.js +3 -1
- package/src/utils/Utils.js +4 -2
- package/tests/__snapshots__/Editor.test.js.snap +1 -5
- package/tests/components/__snapshots__/Photo.test.js.snap +2 -10
package/package.json
CHANGED
package/src/utils/Exif.js
CHANGED
|
@@ -126,11 +126,11 @@ export function getSphereCorrection(picture) {
|
|
|
126
126
|
roll = roll || 0;
|
|
127
127
|
|
|
128
128
|
// Send result
|
|
129
|
-
return {
|
|
129
|
+
return pitch !== 0 && roll !== 0 ? {
|
|
130
130
|
pan: yaw * Math.PI / 180,
|
|
131
131
|
tilt: pitch * Math.PI / 180,
|
|
132
132
|
roll: roll * Math.PI / 180,
|
|
133
|
-
};
|
|
133
|
+
} : {};
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
/**
|
package/src/utils/Map.js
CHANGED
|
@@ -181,7 +181,9 @@ export function combineStyles(parent, options) {
|
|
|
181
181
|
|
|
182
182
|
// Override labels to use appropriate language
|
|
183
183
|
if(style.metadata["panoramax:locales"]) {
|
|
184
|
-
|
|
184
|
+
let prefLang = parent._options.lang || autoDetectLocale(style.metadata["panoramax:locales"], "latin");
|
|
185
|
+
if(prefLang.includes("-")) { prefLang = prefLang.split("-")[0]; }
|
|
186
|
+
if(prefLang.includes("_")) { prefLang = prefLang.split("_")[0]; }
|
|
185
187
|
style.layers.forEach(l => {
|
|
186
188
|
if(isLabelLayer(l) && l.layout["text-field"].includes("name:latin")) {
|
|
187
189
|
l.layout["text-field"] = [
|
package/src/utils/Utils.js
CHANGED
|
@@ -386,7 +386,7 @@ export function apiFeatureToPSVNode(f, t, fastInternet=false, customLinkFilter=n
|
|
|
386
386
|
};
|
|
387
387
|
}
|
|
388
388
|
// 360°
|
|
389
|
-
else if(is360) {
|
|
389
|
+
else if(is360 && matrix) {
|
|
390
390
|
panorama = {
|
|
391
391
|
baseUrl,
|
|
392
392
|
origBaseUrl: baseUrl,
|
|
@@ -431,7 +431,7 @@ export function apiFeatureToPSVNode(f, t, fastInternet=false, customLinkFilter=n
|
|
|
431
431
|
};
|
|
432
432
|
}
|
|
433
433
|
|
|
434
|
-
|
|
434
|
+
const node = {
|
|
435
435
|
id: f.id,
|
|
436
436
|
caption: getNodeCaption(f, t),
|
|
437
437
|
panorama,
|
|
@@ -446,6 +446,8 @@ export function apiFeatureToPSVNode(f, t, fastInternet=false, customLinkFilter=n
|
|
|
446
446
|
horizontalFov,
|
|
447
447
|
properties: f.properties,
|
|
448
448
|
};
|
|
449
|
+
|
|
450
|
+
return node;
|
|
449
451
|
}
|
|
450
452
|
|
|
451
453
|
/**
|
|
@@ -104,11 +104,7 @@ Object {
|
|
|
104
104
|
"nextPic": "ccf5f468-38b8-4b42-8d79-b97f5391e0a3",
|
|
105
105
|
"prevPic": "127d9282-d082-46ca-bc09-4b0d8569dd2c",
|
|
106
106
|
},
|
|
107
|
-
"sphereCorrection": Object {
|
|
108
|
-
"pan": 0,
|
|
109
|
-
"roll": 0,
|
|
110
|
-
"tilt": 0,
|
|
111
|
-
},
|
|
107
|
+
"sphereCorrection": Object {},
|
|
112
108
|
}
|
|
113
109
|
`;
|
|
114
110
|
|
|
@@ -177,11 +173,7 @@ Object {
|
|
|
177
173
|
"nextPic": "ccf5f468-38b8-4b42-8d79-b97f5391e0a3",
|
|
178
174
|
"prevPic": "127d9282-d082-46ca-bc09-4b0d8569dd2c",
|
|
179
175
|
},
|
|
180
|
-
"sphereCorrection": Object {
|
|
181
|
-
"pan": 0,
|
|
182
|
-
"roll": 0,
|
|
183
|
-
"tilt": 0,
|
|
184
|
-
},
|
|
176
|
+
"sphereCorrection": Object {},
|
|
185
177
|
}
|
|
186
178
|
`;
|
|
187
179
|
|