@panoramax/web-viewer 3.1.1-develop-4687b4f6 → 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 +1 -0
- package/build/index.js +1 -1
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/src/utils/Map.js +3 -1
package/package.json
CHANGED
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"] = [
|