@panoramax/web-viewer 3.2.3-develop-d26f8f3d → 3.2.3-develop-76d7de04
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.
|
@@ -63,7 +63,6 @@ Component properties. All of [Basic properties](Basic.md/#Panoramax.components.c
|
|
|
63
63
|
| [picture] | <code>string</code> | | The picture ID to display |
|
|
64
64
|
| [sequence] | <code>string</code> | | The sequence ID of the picture displayed |
|
|
65
65
|
| [fetchOptions] | <code>object</code> | | Set custom options for fetch calls made against API ([same syntax as fetch options parameter](https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters)) |
|
|
66
|
-
| [users] | <code>Array.<string></code> | <code>[geovisio]</code> | List of users IDs to use for map display (defaults to general map, identified as "geovisio") |
|
|
67
66
|
| [mapstyle] | <code>string</code> \| <code>object</code> | | The map's MapLibre style. This can be an a JSON object conforming to the schema described in the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/), or a URL string pointing to one. Defaults to OSM vector tiles. |
|
|
68
67
|
| [lang] | <code>string</code> | | To override language used for labels. Defaults to using user's preferred languages. |
|
|
69
68
|
| [raster] | <code>object</code> | | The MapLibre raster source for aerial background. This must be a JSON object following [MapLibre raster source definition](https://maplibre.org/maplibre-style-spec/sources/#raster). |
|
package/package.json
CHANGED
|
@@ -47,7 +47,6 @@ export default class Editor extends Basic {
|
|
|
47
47
|
* @property {string} [picture] The picture ID to display
|
|
48
48
|
* @property {string} [sequence] The sequence ID of the picture displayed
|
|
49
49
|
* @property {object} [fetchOptions] Set custom options for fetch calls made against API ([same syntax as fetch options parameter](https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters))
|
|
50
|
-
* @property {string[]} [users=[geovisio]] List of users IDs to use for map display (defaults to general map, identified as "geovisio")
|
|
51
50
|
* @property {string|object} [mapstyle] The map's MapLibre style. This can be an a JSON object conforming to the schema described in the [MapLibre Style Specification](https://maplibre.org/maplibre-style-spec/), or a URL string pointing to one. Defaults to OSM vector tiles.
|
|
52
51
|
* @property {string} [lang] To override language used for labels. Defaults to using user's preferred languages.
|
|
53
52
|
* @property {object} [raster] The MapLibre raster source for aerial background. This must be a JSON object following [MapLibre raster source definition](https://maplibre.org/maplibre-style-spec/sources/#raster).
|
|
@@ -97,6 +96,23 @@ export default class Editor extends Basic {
|
|
|
97
96
|
}
|
|
98
97
|
}
|
|
99
98
|
|
|
99
|
+
connectedCallback() {
|
|
100
|
+
if(Array.isArray(this.users) && this.users.length > 0) {
|
|
101
|
+
console.warn("Parameters users can't be changed in Editor, only selected sequence can be visible");
|
|
102
|
+
this.users = [];
|
|
103
|
+
}
|
|
104
|
+
super.connectedCallback();
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
attributeChangedCallback(name, old, value) {
|
|
108
|
+
if(name === "users" && Array.isArray(value) && value.length > 0) {
|
|
109
|
+
console.warn("Parameters users can't be changed in Editor, only selected sequence can be visible");
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
super.attributeChangedCallback(name, old, value);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
|
|
100
116
|
/** @private */
|
|
101
117
|
render() {
|
|
102
118
|
return [this.loader, this._psvContainer, this._mapContainer];
|
package/src/components/ui/Map.js
CHANGED
|
@@ -334,6 +334,7 @@ export default class Map extends maplibregl.Map {
|
|
|
334
334
|
*/
|
|
335
335
|
async setVisibleUsers(visibleIds = []) {
|
|
336
336
|
if(typeof visibleIds === "string") { visibleIds = [visibleIds]; }
|
|
337
|
+
else if(visibleIds === null) { visibleIds = []; }
|
|
337
338
|
|
|
338
339
|
// Create any missing user layer
|
|
339
340
|
await Promise.all(
|