@panoramax/web-viewer 4.0.0 → 4.0.1-develop-1e9682f2
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 +14 -3
- package/build/index.css +1 -1
- package/build/index.js +4 -4
- package/build/index.js.map +1 -1
- package/docs/03_URL_settings.md +1 -1
- package/docs/09_Develop.md +1 -1
- package/docs/reference/components/ui/Photo.md +1 -1
- package/docs/reference/utils/API.md +1 -1
- package/docs/tutorials/migrate_v4.md +1 -1
- package/docs/tutorials/synced_coverage.md +1 -1
- package/package.json +1 -1
- package/src/components/core/PhotoViewer.js +5 -1
- package/src/components/core/Viewer.js +8 -3
- package/src/components/menus/PictureLegend.js +6 -2
- package/src/components/ui/Photo.js +1 -1
- package/src/utils/API.js +1 -1
package/docs/03_URL_settings.md
CHANGED
|
@@ -31,7 +31,7 @@ By default, picture is shown wide.
|
|
|
31
31
|
|
|
32
32
|
### :simple-speedtest: `speed`: sequence play speed
|
|
33
33
|
|
|
34
|
-
The duration of stay on a picture during sequence play (excluding image
|
|
34
|
+
The duration of stay on a picture during sequence play (excluding image downloading time), in milliseconds. Authorized values are between 0 and 3000. Example:
|
|
35
35
|
|
|
36
36
|
```urlencoded
|
|
37
37
|
speed=1000
|
package/docs/09_Develop.md
CHANGED
|
@@ -14,7 +14,7 @@ The current code is split between various elements:
|
|
|
14
14
|
|
|
15
15
|
- __Core components__: a single functional entry, like [Viewer](./reference/components/core/Viewer.md) (map + picture), [Photo Viewer](./reference/components/core/PhotoViewer.md) (picture only), [Coverage Map](./reference/components/core/CoverageMap.md) or [Editor](./reference/components/core/Editor.md). They share parts of code in [Basic](./reference/components/core/Basic.md) class. They specialized the behaviour of components depending on the needs.
|
|
16
16
|
- __UI components, menus & widgets__: reusable web components, like [Map](./reference/components/ui/Map.md), [Photo](./reference/components/ui/Photo.md) or [Loader](./reference/components/ui/Loader.md). They are used in some views depending of the context.
|
|
17
|
-
- __Utils__: utility functions,
|
|
17
|
+
- __Utils__: utility functions, split into various files for clarity.
|
|
18
18
|
|
|
19
19
|

|
|
20
20
|
|
|
@@ -289,7 +289,7 @@ Event for picture preview
|
|
|
289
289
|
| --- | --- | --- |
|
|
290
290
|
| detail.picId | <code>string</code> | The picture ID |
|
|
291
291
|
| detail.coordinates | <code>Array.<number></code> | [x,y] coordinates |
|
|
292
|
-
| detail.direction | <code>number</code> | The
|
|
292
|
+
| detail.direction | <code>number</code> | The theoretical picture orientation |
|
|
293
293
|
|
|
294
294
|
<a name="Panoramax.components.ui.Photo+event_picture-preview-stopped"></a>
|
|
295
295
|
|
|
@@ -39,7 +39,7 @@ API contains various utility functions to communicate with Panoramax/STAC API
|
|
|
39
39
|
|
|
40
40
|
| Param | Type | Default | Description |
|
|
41
41
|
| --- | --- | --- | --- |
|
|
42
|
-
| endpoint | <code>string</code> | | The endpoint. It corresponds to the <a href="https://github.com/radiantearth/stac-api-spec/blob/main/overview.md#example-landing-page">STAC landing page</a>, with all links describing the API
|
|
42
|
+
| endpoint | <code>string</code> | | The endpoint. It corresponds to the <a href="https://github.com/radiantearth/stac-api-spec/blob/main/overview.md#example-landing-page">STAC landing page</a>, with all links describing the API capabilities. |
|
|
43
43
|
| [options] | <code>object</code> | | Options |
|
|
44
44
|
| [options.style] | <code>string</code> \| <code>object</code> | | General map style |
|
|
45
45
|
| [options.tiles] | <code>string</code> | | API route serving pictures & sequences vector tiles |
|
|
@@ -68,7 +68,7 @@ Many stuff was moved around, and have a bit different naming. Main classes shoul
|
|
|
68
68
|
|
|
69
69
|
A new main component is available, named __Photo Viewer__ (`<pnx-photo-viewer>`) for showing up only picture (without map).
|
|
70
70
|
|
|
71
|
-
And source code is
|
|
71
|
+
And source code is split into more packages:
|
|
72
72
|
|
|
73
73
|
* `Panoramax.components` : everything you can see graphically
|
|
74
74
|
* `.core` : Viewer, Editor, Coverage Map and Basic (common code)
|
|
@@ -32,7 +32,7 @@ coverage.addEventListener("ready", () => {
|
|
|
32
32
|
console.log("Selected sequence", e.detail.seqId, "picture", e.detail.picId);
|
|
33
33
|
});
|
|
34
34
|
|
|
35
|
-
// You can also
|
|
35
|
+
// You can also programmatically change selection on map
|
|
36
36
|
coverage.select(
|
|
37
37
|
"c463d190-06b0-47fb-98a8-b4a775a39ad6", // A sequence ID
|
|
38
38
|
"bdea1eb4-4496-46da-a4d5-b22b16e75fa8" // A picture ID (can be null if unknown)
|
package/package.json
CHANGED
|
@@ -323,7 +323,11 @@ export default class PhotoViewer extends Basic {
|
|
|
323
323
|
for(let cn of this.grid.childNodes) {
|
|
324
324
|
if(cn.getAttribute("slot") !== "bg") {
|
|
325
325
|
cn.addEventListener("focusin", () => keytonone());
|
|
326
|
-
cn.addEventListener("focusout", () =>
|
|
326
|
+
cn.addEventListener("focusout", () => {
|
|
327
|
+
if(this.popup.getAttribute("visible") === null) {
|
|
328
|
+
keytopsv();
|
|
329
|
+
}
|
|
330
|
+
});
|
|
327
331
|
}
|
|
328
332
|
}
|
|
329
333
|
}
|
|
@@ -336,11 +336,11 @@ export default class Viewer extends PhotoViewer {
|
|
|
336
336
|
};
|
|
337
337
|
const keytopsv = () => {
|
|
338
338
|
this.psv.startKeyboardControl();
|
|
339
|
-
this.map
|
|
339
|
+
this.map.keyboard.disable();
|
|
340
340
|
};
|
|
341
341
|
const keytonone = () => {
|
|
342
342
|
this.psv.stopKeyboardControl();
|
|
343
|
-
this.map
|
|
343
|
+
this.map.keyboard.disable();
|
|
344
344
|
};
|
|
345
345
|
const keytofocused = () => {
|
|
346
346
|
if(this.map && this.isMapWide()) { keytomap(); }
|
|
@@ -350,6 +350,7 @@ export default class Viewer extends PhotoViewer {
|
|
|
350
350
|
// General focus change
|
|
351
351
|
this.addEventListener("focus-changed", e => {
|
|
352
352
|
if(e.detail.focus === "map") { keytomap(); }
|
|
353
|
+
if(this.popup.getAttribute("visible")) { keytonone(); }
|
|
353
354
|
else { keytopsv(); }
|
|
354
355
|
});
|
|
355
356
|
|
|
@@ -361,7 +362,11 @@ export default class Viewer extends PhotoViewer {
|
|
|
361
362
|
for(let cn of this.grid.childNodes) {
|
|
362
363
|
if(cn.getAttribute("slot") !== "bg") {
|
|
363
364
|
cn.addEventListener("focusin", () => keytonone());
|
|
364
|
-
cn.addEventListener("focusout", () =>
|
|
365
|
+
cn.addEventListener("focusout", () => {
|
|
366
|
+
if(this.popup.getAttribute("visible") === null) {
|
|
367
|
+
keytofocused();
|
|
368
|
+
}
|
|
369
|
+
});
|
|
365
370
|
}
|
|
366
371
|
}
|
|
367
372
|
}
|
|
@@ -152,7 +152,6 @@ export default class PictureLegend extends LitElement {
|
|
|
152
152
|
_onPicChange(picMeta) {
|
|
153
153
|
clearTimeout(this._addrTimer1);
|
|
154
154
|
this._caption = picMeta?.caption;
|
|
155
|
-
this._expanded = this._expanded && this.collapsable;
|
|
156
155
|
|
|
157
156
|
if(picMeta) {
|
|
158
157
|
const coordsHash = `${picMeta.gps[0]}/${picMeta.gps[1]}`;
|
|
@@ -178,7 +177,12 @@ export default class PictureLegend extends LitElement {
|
|
|
178
177
|
|
|
179
178
|
/** @private */
|
|
180
179
|
_onBackClick() {
|
|
181
|
-
this._parent.
|
|
180
|
+
if(this._parent.isWidthSmall() && this._parent.focus === "map") {
|
|
181
|
+
this._parent.select();
|
|
182
|
+
}
|
|
183
|
+
else {
|
|
184
|
+
this._parent._setFocus?.("map");
|
|
185
|
+
}
|
|
182
186
|
}
|
|
183
187
|
|
|
184
188
|
/** @private */
|
|
@@ -338,7 +338,7 @@ export default class Photo extends PSViewer {
|
|
|
338
338
|
* @type {CustomEvent}
|
|
339
339
|
* @property {string} detail.picId The picture ID
|
|
340
340
|
* @property {number[]} detail.coordinates [x,y] coordinates
|
|
341
|
-
* @property {number} detail.direction The
|
|
341
|
+
* @property {number} detail.direction The theoretical picture orientation
|
|
342
342
|
*/
|
|
343
343
|
const event = new CustomEvent("picture-preview-started", { detail: {
|
|
344
344
|
picId: fromLink.nodeId,
|
package/src/utils/API.js
CHANGED
|
@@ -8,7 +8,7 @@ import { isNullId } from "./utils";
|
|
|
8
8
|
* @typicalname api
|
|
9
9
|
* @fires Panoramax.utils.API#ready
|
|
10
10
|
* @fires Panoramax.utils.API#broken
|
|
11
|
-
* @param {string} endpoint The endpoint. It corresponds to the <a href="https://github.com/radiantearth/stac-api-spec/blob/main/overview.md#example-landing-page">STAC landing page</a>, with all links describing the API
|
|
11
|
+
* @param {string} endpoint The endpoint. It corresponds to the <a href="https://github.com/radiantearth/stac-api-spec/blob/main/overview.md#example-landing-page">STAC landing page</a>, with all links describing the API capabilities.
|
|
12
12
|
* @param {object} [options] Options
|
|
13
13
|
* @param {string|object} [options.style] General map style
|
|
14
14
|
* @param {string} [options.tiles] API route serving pictures & sequences vector tiles
|