@panoramax/web-viewer 4.0.3-develop-fc3c6115 → 4.0.3-develop-503c9f25
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 +3 -3
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/menus/MapFilters.js +9 -1
- package/src/utils/API.js +1 -1
package/package.json
CHANGED
|
@@ -180,11 +180,19 @@ export default class MapFilters extends LitElement {
|
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
// Map zoom
|
|
183
|
-
this._parent?.onceMapReady?.().then(() => {
|
|
183
|
+
this._parent?.onceMapReady?.().then(async () => {
|
|
184
184
|
this._parent.map.on("zoomend", this._onMapZoom.bind(this));
|
|
185
185
|
this._parent.map.on("filters-changed", this._onParentFilterChange.bind(this));
|
|
186
186
|
this._onMapZoom();
|
|
187
187
|
this._onParentFilterChange(this._parent.map._mapFilters);
|
|
188
|
+
|
|
189
|
+
// Load default users filter
|
|
190
|
+
const vu = this._parent.map.getVisibleUsers();
|
|
191
|
+
if(vu?.length > 0 && vu[0] != "geovisio") {
|
|
192
|
+
this.user = vu[0];
|
|
193
|
+
const username = await this._parent.api.getUserName(vu[0]);
|
|
194
|
+
if(username) { this.user = username; }
|
|
195
|
+
}
|
|
188
196
|
});
|
|
189
197
|
}
|
|
190
198
|
|
package/src/utils/API.js
CHANGED
|
@@ -754,7 +754,7 @@ export default class API extends EventTarget {
|
|
|
754
754
|
return fetch(this._endpoints.user_search.replace(/\/search$/, `/${userId}`), this._getFetchOptions())
|
|
755
755
|
.then(res => res.json())
|
|
756
756
|
.then(res => {
|
|
757
|
-
return res?.name || null;
|
|
757
|
+
return res?.label || res?.name || null;
|
|
758
758
|
});
|
|
759
759
|
}
|
|
760
760
|
|