@panoramax/web-viewer 3.2.3 → 4.0.0-develop-39167b4d
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/.gitlab-ci.yml +13 -6
- package/CHANGELOG.md +53 -1
- package/CODE_OF_CONDUCT.md +1 -1
- package/README.md +1 -1
- package/build/editor.html +10 -1
- package/build/index.css +12 -12
- package/build/index.css.map +1 -1
- package/build/index.html +1 -1
- package/build/index.js +2126 -14
- package/build/index.js.map +1 -1
- package/build/map.html +1 -1
- package/build/photo.html +1 -0
- package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff +0 -0
- package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff2 +0 -0
- package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff +0 -0
- package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff2 +0 -0
- package/build/viewer.html +12 -1
- package/build/widgets.html +1 -0
- package/config/jest/mocks.js +201 -0
- package/config/paths.js +2 -0
- package/config/webpack.config.js +52 -0
- package/docs/03_URL_settings.md +14 -16
- package/docs/05_Compatibility.md +59 -76
- package/docs/09_Develop.md +46 -11
- package/docs/90_Releases.md +2 -2
- package/docs/images/class_diagram.drawio +60 -45
- package/docs/images/class_diagram.jpg +0 -0
- package/docs/images/screenshot.jpg +0 -0
- package/docs/index.md +135 -0
- package/docs/reference/components/core/Basic.md +196 -0
- package/docs/reference/components/core/CoverageMap.md +210 -0
- package/docs/reference/components/core/Editor.md +224 -0
- package/docs/reference/components/core/PhotoViewer.md +307 -0
- package/docs/reference/components/core/Viewer.md +350 -0
- package/docs/reference/components/layout/BottomDrawer.md +35 -0
- package/docs/reference/components/layout/CorneredGrid.md +29 -0
- package/docs/reference/components/layout/Mini.md +45 -0
- package/docs/reference/components/layout/Tabs.md +45 -0
- package/docs/reference/components/menus/MapBackground.md +32 -0
- package/docs/reference/components/menus/MapFilters.md +15 -0
- package/docs/reference/components/menus/MapLayers.md +15 -0
- package/docs/reference/components/menus/MapLegend.md +15 -0
- package/docs/reference/components/menus/PictureLegend.md +16 -0
- package/docs/reference/components/menus/PictureMetadata.md +15 -0
- package/docs/reference/components/menus/PlayerOptions.md +15 -0
- package/docs/reference/components/menus/QualityScoreDoc.md +15 -0
- package/docs/reference/components/menus/ReportForm.md +15 -0
- package/docs/reference/components/menus/ShareMenu.md +15 -0
- package/docs/reference/components/ui/Button.md +40 -0
- package/docs/reference/components/ui/ButtonGroup.md +36 -0
- package/docs/reference/components/ui/CopyButton.md +38 -0
- package/docs/reference/components/ui/Grade.md +32 -0
- package/docs/reference/components/ui/LinkButton.md +45 -0
- package/docs/reference/components/ui/ListGroup.md +22 -0
- package/docs/reference/components/ui/Loader.md +56 -0
- package/docs/reference/components/ui/Map.md +239 -0
- package/docs/reference/components/ui/MapMore.md +256 -0
- package/docs/reference/components/ui/Photo.md +385 -0
- package/docs/reference/components/ui/Popup.md +56 -0
- package/docs/reference/components/ui/ProgressBar.md +32 -0
- package/docs/reference/components/ui/QualityScore.md +45 -0
- package/docs/reference/components/ui/SearchBar.md +63 -0
- package/docs/reference/components/ui/TogglableGroup.md +39 -0
- package/docs/reference/components/ui/widgets/GeoSearch.md +32 -0
- package/docs/reference/components/ui/widgets/Legend.md +49 -0
- package/docs/reference/components/ui/widgets/MapFiltersButton.md +33 -0
- package/docs/reference/components/ui/widgets/MapLayersButton.md +15 -0
- package/docs/reference/components/ui/widgets/OSMEditors.md +15 -0
- package/docs/reference/components/ui/widgets/PictureLegendActions.md +32 -0
- package/docs/reference/components/ui/widgets/Player.md +33 -0
- package/docs/reference/components/ui/widgets/Zoom.md +15 -0
- package/docs/reference/utils/API.md +334 -0
- package/docs/reference/utils/InitParameters.md +68 -0
- package/docs/reference/utils/URLHandler.md +107 -0
- package/docs/reference.md +79 -0
- package/docs/shortcuts.md +11 -0
- package/docs/tutorials/aerial_imagery.md +19 -0
- package/docs/tutorials/authentication.md +10 -0
- package/docs/tutorials/custom_widgets.md +59 -0
- package/docs/tutorials/map_style.md +39 -0
- package/docs/tutorials/migrate_v4.md +153 -0
- package/docs/tutorials/synced_coverage.md +43 -0
- package/mkdocs.yml +66 -5
- package/package.json +22 -17
- package/public/editor.html +21 -29
- package/public/index.html +17 -12
- package/public/map.html +19 -18
- package/public/photo.html +55 -0
- package/public/viewer.html +22 -26
- package/public/widgets.html +306 -0
- package/scripts/doc.js +79 -0
- package/src/components/core/Basic.css +48 -0
- package/src/components/core/Basic.js +349 -0
- package/src/components/core/CoverageMap.css +9 -0
- package/src/components/core/CoverageMap.js +139 -0
- package/src/components/core/Editor.css +23 -0
- package/src/components/core/Editor.js +390 -0
- package/src/components/core/PhotoViewer.css +48 -0
- package/src/components/core/PhotoViewer.js +499 -0
- package/src/components/core/Viewer.css +98 -0
- package/src/components/core/Viewer.js +564 -0
- package/src/components/core/index.js +12 -0
- package/src/components/index.js +13 -0
- package/src/components/layout/BottomDrawer.js +257 -0
- package/src/components/layout/CorneredGrid.js +112 -0
- package/src/components/layout/Mini.js +117 -0
- package/src/components/layout/Tabs.js +133 -0
- package/src/components/layout/index.js +9 -0
- package/src/components/menus/MapBackground.js +106 -0
- package/src/components/menus/MapFilters.js +400 -0
- package/src/components/menus/MapLayers.js +143 -0
- package/src/components/menus/MapLegend.js +34 -0
- package/src/components/menus/PictureLegend.js +257 -0
- package/src/components/menus/PictureMetadata.js +317 -0
- package/src/components/menus/PlayerOptions.js +95 -0
- package/src/components/menus/QualityScoreDoc.js +36 -0
- package/src/components/menus/ReportForm.js +133 -0
- package/src/components/menus/Share.js +100 -0
- package/src/components/menus/index.js +15 -0
- package/src/components/styles.js +383 -0
- package/src/components/ui/Button.js +77 -0
- package/src/components/ui/ButtonGroup.css +57 -0
- package/src/components/ui/ButtonGroup.js +68 -0
- package/src/components/ui/CopyButton.js +106 -0
- package/src/components/ui/Grade.js +54 -0
- package/src/components/ui/LinkButton.js +67 -0
- package/src/components/ui/ListGroup.js +66 -0
- package/src/components/ui/Loader.js +203 -0
- package/src/components/{Map.css → ui/Map.css} +5 -17
- package/src/components/{Map.js → ui/Map.js} +148 -156
- package/src/components/ui/MapMore.js +324 -0
- package/src/components/{Photo.css → ui/Photo.css} +6 -6
- package/src/components/{Photo.js → ui/Photo.js} +313 -101
- package/src/components/ui/Popup.js +145 -0
- package/src/components/ui/ProgressBar.js +104 -0
- package/src/components/ui/QualityScore.js +147 -0
- package/src/components/ui/SearchBar.js +367 -0
- package/src/components/ui/TogglableGroup.js +157 -0
- package/src/components/ui/index.js +22 -0
- package/src/components/ui/widgets/GeoSearch.css +21 -0
- package/src/components/ui/widgets/GeoSearch.js +139 -0
- package/src/components/ui/widgets/Legend.js +113 -0
- package/src/components/ui/widgets/MapFiltersButton.js +104 -0
- package/src/components/ui/widgets/MapLayersButton.js +79 -0
- package/src/components/ui/widgets/OSMEditors.js +155 -0
- package/src/components/ui/widgets/PictureLegendActions.js +117 -0
- package/src/components/ui/widgets/Player.css +7 -0
- package/src/components/ui/widgets/Player.js +151 -0
- package/src/components/ui/widgets/Zoom.js +82 -0
- package/src/components/ui/widgets/index.js +13 -0
- package/src/img/loader_base.jpg +0 -0
- package/src/img/panoramax.svg +13 -0
- package/src/img/switch_big.svg +20 -10
- package/src/index.js +7 -9
- package/src/translations/br.json +1 -0
- package/src/translations/da.json +38 -15
- package/src/translations/de.json +5 -3
- package/src/translations/en.json +35 -15
- package/src/translations/eo.json +38 -15
- package/src/translations/es.json +1 -1
- package/src/translations/fr.json +36 -16
- package/src/translations/hu.json +1 -1
- package/src/translations/it.json +39 -16
- package/src/translations/ja.json +182 -1
- package/src/translations/nl.json +106 -6
- package/src/translations/pl.json +1 -1
- package/src/translations/sv.json +182 -0
- package/src/translations/zh_Hant.json +35 -14
- package/src/utils/API.js +109 -49
- package/src/utils/InitParameters.js +388 -0
- package/src/utils/PhotoAdapter.js +1 -0
- package/src/utils/URLHandler.js +362 -0
- package/src/utils/geocoder.js +152 -0
- package/src/utils/{I18n.js → i18n.js} +7 -3
- package/src/utils/index.js +11 -0
- package/src/utils/{Map.js → map.js} +256 -77
- package/src/utils/picture.js +442 -0
- package/src/utils/utils.js +324 -0
- package/src/utils/widgets.js +55 -0
- package/tests/components/core/Basic.test.js +121 -0
- package/tests/components/core/BasicMock.js +25 -0
- package/tests/components/core/CoverageMap.test.js +20 -0
- package/tests/components/core/Editor.test.js +20 -0
- package/tests/components/core/PhotoViewer.test.js +57 -0
- package/tests/components/core/Viewer.test.js +84 -0
- package/tests/components/core/__snapshots__/PhotoViewer.test.js.snap +73 -0
- package/tests/components/core/__snapshots__/Viewer.test.js.snap +145 -0
- package/tests/components/ui/CopyButton.test.js +52 -0
- package/tests/components/ui/Loader.test.js +55 -0
- package/tests/components/{Map.test.js → ui/Map.test.js} +73 -61
- package/tests/components/{Photo.test.js → ui/Photo.test.js} +97 -63
- package/tests/components/ui/Popup.test.js +26 -0
- package/tests/components/ui/QualityScore.test.js +18 -0
- package/tests/components/ui/SearchBar.test.js +110 -0
- package/tests/components/ui/__snapshots__/CopyButton.test.js.snap +33 -0
- package/tests/components/ui/__snapshots__/Loader.test.js.snap +56 -0
- package/tests/components/{__snapshots__ → ui/__snapshots__}/Map.test.js.snap +11 -38
- package/tests/components/{__snapshots__ → ui/__snapshots__}/Photo.test.js.snap +70 -6
- package/tests/components/ui/__snapshots__/Popup.test.js.snap +29 -0
- package/tests/components/ui/__snapshots__/QualityScore.test.js.snap +11 -0
- package/tests/components/ui/__snapshots__/SearchBar.test.js.snap +65 -0
- package/tests/utils/API.test.js +83 -83
- package/tests/utils/InitParameters.test.js +499 -0
- package/tests/utils/URLHandler.test.js +401 -0
- package/tests/utils/__snapshots__/API.test.js.snap +10 -0
- package/tests/utils/__snapshots__/URLHandler.test.js.snap +21 -0
- package/tests/utils/__snapshots__/{Map.test.js.snap → geocoder.test.js.snap} +1 -1
- package/tests/utils/__snapshots__/map.test.js.snap +11 -0
- package/tests/utils/__snapshots__/picture.test.js.snap +327 -0
- package/tests/utils/__snapshots__/widgets.test.js.snap +19 -0
- package/tests/utils/geocoder.test.js +37 -0
- package/tests/utils/{I18n.test.js → i18n.test.js} +8 -8
- package/tests/utils/map.test.js +126 -0
- package/tests/utils/picture.test.js +745 -0
- package/tests/utils/utils.test.js +288 -0
- package/tests/utils/widgets.test.js +31 -0
- package/docs/01_Start.md +0 -149
- package/docs/02_Usage.md +0 -831
- package/docs/04_Advanced_examples.md +0 -216
- package/src/Editor.css +0 -37
- package/src/Editor.js +0 -361
- package/src/StandaloneMap.js +0 -114
- package/src/Viewer.css +0 -203
- package/src/Viewer.js +0 -1246
- package/src/components/CoreView.css +0 -70
- package/src/components/CoreView.js +0 -175
- package/src/components/Loader.css +0 -74
- package/src/components/Loader.js +0 -120
- package/src/img/loader_hd.jpg +0 -0
- package/src/utils/Exif.js +0 -193
- package/src/utils/Utils.js +0 -631
- package/src/utils/Widgets.js +0 -562
- package/src/viewer/URLHash.js +0 -469
- package/src/viewer/Widgets.css +0 -880
- package/src/viewer/Widgets.js +0 -1470
- package/tests/Editor.test.js +0 -126
- package/tests/StandaloneMap.test.js +0 -45
- package/tests/Viewer.test.js +0 -366
- package/tests/__snapshots__/Editor.test.js.snap +0 -298
- package/tests/__snapshots__/StandaloneMap.test.js.snap +0 -30
- package/tests/__snapshots__/Viewer.test.js.snap +0 -195
- package/tests/components/CoreView.test.js +0 -92
- package/tests/components/Loader.test.js +0 -38
- package/tests/components/__snapshots__/Loader.test.js.snap +0 -15
- package/tests/utils/Exif.test.js +0 -124
- package/tests/utils/Map.test.js +0 -113
- package/tests/utils/Utils.test.js +0 -300
- package/tests/utils/Widgets.test.js +0 -107
- package/tests/utils/__snapshots__/Exif.test.js.snap +0 -43
- package/tests/utils/__snapshots__/Utils.test.js.snap +0 -41
- package/tests/utils/__snapshots__/Widgets.test.js.snap +0 -44
- package/tests/viewer/URLHash.test.js +0 -559
- package/tests/viewer/Widgets.test.js +0 -127
- package/tests/viewer/__snapshots__/URLHash.test.js.snap +0 -108
- package/tests/viewer/__snapshots__/Widgets.test.js.snap +0 -403
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.Photo"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.Photo ⇐ <code>[photo-sphere-viewer.core.Viewer](https://photo-sphere-viewer.js.org/api/classes/Core.Viewer.html)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui</code>
|
|
5
|
+
**Extends**: <code>[photo-sphere-viewer.core.Viewer](https://photo-sphere-viewer.js.org/api/classes/Core.Viewer.html)</code>
|
|
6
|
+
**Emits**: [<code>picture-loading</code>](#Panoramax.components.ui.Photo+event_picture-loading), [<code>picture-preview-started</code>](#Panoramax.components.ui.Photo+event_picture-preview-started), [<code>picture-preview-stopped</code>](#Panoramax.components.ui.Photo+event_picture-preview-stopped), [<code>view-rotated</code>](#Panoramax.components.ui.Photo+event_view-rotated), [<code>picture-loaded</code>](#Panoramax.components.ui.Photo+event_picture-loaded), [<code>picture-tiles-loaded</code>](#Panoramax.components.ui.Photo+event_picture-tiles-loaded), [<code>transition-duration-changed</code>](#Panoramax.components.ui.Photo+event_transition-duration-changed), [<code>sequence-playing</code>](#Panoramax.components.ui.Photo+event_sequence-playing), [<code>sequence-stopped</code>](#Panoramax.components.ui.Photo+event_sequence-stopped), [<code>pictures-navigation-changed</code>](#Panoramax.components.ui.Photo+event_pictures-navigation-changed), [<code>ready</code>](#Panoramax.components.ui.Photo+event_ready)
|
|
7
|
+
|
|
8
|
+
* [.Photo](#Panoramax.components.ui.Photo) ⇐ <code>[photo-sphere-viewer.core.Viewer](https://photo-sphere-viewer.js.org/api/classes/Core.Viewer.html)</code>
|
|
9
|
+
* [new Photo(parent, container, [options])](#new_Panoramax.components.ui.Photo_new)
|
|
10
|
+
* [.getPictureMetadata()](#Panoramax.components.ui.Photo+getPictureMetadata) ⇒ <code>object</code>
|
|
11
|
+
* [.getPictureId()](#Panoramax.components.ui.Photo+getPictureId) ⇒ <code>string</code> \| <code>null</code>
|
|
12
|
+
* [.goToNextPicture()](#Panoramax.components.ui.Photo+goToNextPicture)
|
|
13
|
+
* [.goToPrevPicture()](#Panoramax.components.ui.Photo+goToPrevPicture)
|
|
14
|
+
* [.goToPosition(lat, lon)](#Panoramax.components.ui.Photo+goToPosition) ⇒ <code>Promise</code>
|
|
15
|
+
* [.getXY()](#Panoramax.components.ui.Photo+getXY) ⇒ <code>object</code>
|
|
16
|
+
* [.getXYZ()](#Panoramax.components.ui.Photo+getXYZ) ⇒ <code>object</code>
|
|
17
|
+
* [.getPictureOriginalHeading()](#Panoramax.components.ui.Photo+getPictureOriginalHeading) ⇒ <code>number</code>
|
|
18
|
+
* [.getPictureRelativeHeading()](#Panoramax.components.ui.Photo+getPictureRelativeHeading) ⇒ <code>number</code>
|
|
19
|
+
* [.clearPictureMetadataCache()](#Panoramax.components.ui.Photo+clearPictureMetadataCache)
|
|
20
|
+
* [.setXYZ(x, y, z)](#Panoramax.components.ui.Photo+setXYZ)
|
|
21
|
+
* [.setHigherContrast(enable)](#Panoramax.components.ui.Photo+setHigherContrast)
|
|
22
|
+
* [.getTransitionDuration()](#Panoramax.components.ui.Photo+getTransitionDuration) ⇒ <code>number</code>
|
|
23
|
+
* [.setTransitionDuration(value)](#Panoramax.components.ui.Photo+setTransitionDuration)
|
|
24
|
+
* [.showErrorOverlay(e, label, dissmisable)](#Panoramax.components.ui.Photo+showErrorOverlay)
|
|
25
|
+
* [.playSequence()](#Panoramax.components.ui.Photo+playSequence)
|
|
26
|
+
* [.stopSequence()](#Panoramax.components.ui.Photo+stopSequence)
|
|
27
|
+
* [.isSequencePlaying()](#Panoramax.components.ui.Photo+isSequencePlaying) ⇒ <code>boolean</code>
|
|
28
|
+
* [.toggleSequencePlaying()](#Panoramax.components.ui.Photo+toggleSequencePlaying)
|
|
29
|
+
* [.getPicturesNavigation()](#Panoramax.components.ui.Photo+getPicturesNavigation) ⇒ <code>string</code>
|
|
30
|
+
* [.setPicturesNavigation(pn)](#Panoramax.components.ui.Photo+setPicturesNavigation)
|
|
31
|
+
* [.forceRefresh()](#Panoramax.components.ui.Photo+forceRefresh)
|
|
32
|
+
* ["ready"](#Panoramax.components.ui.Photo+event_ready)
|
|
33
|
+
* ["picture-loading"](#Panoramax.components.ui.Photo+event_picture-loading)
|
|
34
|
+
* ["picture-preview-started"](#Panoramax.components.ui.Photo+event_picture-preview-started)
|
|
35
|
+
* ["picture-preview-stopped"](#Panoramax.components.ui.Photo+event_picture-preview-stopped)
|
|
36
|
+
* ["view-rotated"](#Panoramax.components.ui.Photo+event_view-rotated)
|
|
37
|
+
* ["picture-loaded"](#Panoramax.components.ui.Photo+event_picture-loaded)
|
|
38
|
+
* ["picture-tiles-loaded"](#Panoramax.components.ui.Photo+event_picture-tiles-loaded)
|
|
39
|
+
* ["transition-duration-changed"](#Panoramax.components.ui.Photo+event_transition-duration-changed)
|
|
40
|
+
* ["sequence-playing"](#Panoramax.components.ui.Photo+event_sequence-playing)
|
|
41
|
+
* ["sequence-stopped"](#Panoramax.components.ui.Photo+event_sequence-stopped)
|
|
42
|
+
* ["pictures-navigation-changed"](#Panoramax.components.ui.Photo+event_pictures-navigation-changed)
|
|
43
|
+
|
|
44
|
+
<a name="new_Panoramax.components.ui.Photo_new"></a>
|
|
45
|
+
|
|
46
|
+
### new Photo(parent, container, [options])
|
|
47
|
+
Photo is the component showing a single picture.
|
|
48
|
+
It uses Photo Sphere Viewer as a basis, and pre-configure dialog with STAC API.
|
|
49
|
+
|
|
50
|
+
Note that all functions of [PhotoSphereViewer Viewer class](https://photo-sphere-viewer.js.org/api/classes/core.viewer) are available as well.
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
| Param | Type | Default | Description |
|
|
54
|
+
| --- | --- | --- | --- |
|
|
55
|
+
| parent | <code>Panoramax.components.core.basic</code> | | The parent view |
|
|
56
|
+
| container | <code>Element</code> | | The DOM element to create into |
|
|
57
|
+
| [options] | <code>object</code> | | The viewer options. Can be any of [Photo Sphere Viewer options](https://photo-sphere-viewer.js.org/guide/config.html#standard-options) |
|
|
58
|
+
| [options.transitionDuration] | <code>number</code> | | The number of milliseconds the transition animation should be. |
|
|
59
|
+
| [options.position] | <code>Array.<number></code> | | Initial geographical coordinates (as [latitude, longitude]) to find picture nearby. Only used if no picture ID is set. |
|
|
60
|
+
| [options.shouldGoFast] | <code>function</code> | | Function returning a boolean to indicate if we may skip loading HD images. |
|
|
61
|
+
| [options.picturesNavigation] | <code>string</code> | <code>"any"</code> | The allowed pictures navigation ("any": no restriction, "seq": only pictures in same sequence, "pic": only selected picture) |
|
|
62
|
+
|
|
63
|
+
**Example**
|
|
64
|
+
```js
|
|
65
|
+
const psv = new Panoramax.components.ui.Photo(viewer, psvNode, {transitionDuration: 500})
|
|
66
|
+
```
|
|
67
|
+
<a name="Panoramax.components.ui.Photo+getPictureMetadata"></a>
|
|
68
|
+
|
|
69
|
+
### photo.getPictureMetadata() ⇒ <code>object</code>
|
|
70
|
+
Access currently shown picture metadata
|
|
71
|
+
|
|
72
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
73
|
+
**Returns**: <code>object</code> - Picture metadata
|
|
74
|
+
<a name="Panoramax.components.ui.Photo+getPictureId"></a>
|
|
75
|
+
|
|
76
|
+
### photo.getPictureId() ⇒ <code>string</code> \| <code>null</code>
|
|
77
|
+
Get current picture ID, or loading picture ID if any.
|
|
78
|
+
|
|
79
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
80
|
+
**Returns**: <code>string</code> \| <code>null</code> - Picture ID (current or loading), or null if none is selected.
|
|
81
|
+
<a name="Panoramax.components.ui.Photo+goToNextPicture"></a>
|
|
82
|
+
|
|
83
|
+
### photo.goToNextPicture()
|
|
84
|
+
Displays next picture in current sequence (if any)
|
|
85
|
+
|
|
86
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
87
|
+
**Throws**:
|
|
88
|
+
|
|
89
|
+
- <code>Error</code> If no picture is selected, or no next picture available
|
|
90
|
+
|
|
91
|
+
<a name="Panoramax.components.ui.Photo+goToPrevPicture"></a>
|
|
92
|
+
|
|
93
|
+
### photo.goToPrevPicture()
|
|
94
|
+
Displays previous picture in current sequence (if any)
|
|
95
|
+
|
|
96
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
97
|
+
**Throws**:
|
|
98
|
+
|
|
99
|
+
- <code>Error</code> If no picture is selected, or no previous picture available
|
|
100
|
+
|
|
101
|
+
<a name="Panoramax.components.ui.Photo+goToPosition"></a>
|
|
102
|
+
|
|
103
|
+
### photo.goToPosition(lat, lon) ⇒ <code>Promise</code>
|
|
104
|
+
Displays in viewer a picture near to given coordinates
|
|
105
|
+
|
|
106
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
107
|
+
**Fulfil**: <code>string</code> Picture ID if picture found
|
|
108
|
+
**Reject**: <code>Error</code> If no picture found
|
|
109
|
+
|
|
110
|
+
| Param | Type | Description |
|
|
111
|
+
| --- | --- | --- |
|
|
112
|
+
| lat | <code>number</code> | Latitude (WGS84) |
|
|
113
|
+
| lon | <code>number</code> | Longitude (WGS84) |
|
|
114
|
+
|
|
115
|
+
<a name="Panoramax.components.ui.Photo+getXY"></a>
|
|
116
|
+
|
|
117
|
+
### photo.getXY() ⇒ <code>object</code>
|
|
118
|
+
Get 2D position of sphere currently shown to user
|
|
119
|
+
|
|
120
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
121
|
+
**Returns**: <code>object</code> - Position in format { x: heading in degrees (0° = North, 90° = East, 180° = South, 270° = West), y: top/bottom position in degrees (-90° = bottom, 0° = front, 90° = top) }
|
|
122
|
+
<a name="Panoramax.components.ui.Photo+getXYZ"></a>
|
|
123
|
+
|
|
124
|
+
### photo.getXYZ() ⇒ <code>object</code>
|
|
125
|
+
Get 3D position of sphere currently shown to user
|
|
126
|
+
|
|
127
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
128
|
+
**Returns**: <code>object</code> - Position in format { x: heading in degrees (0° = North, 90° = East, 180° = South, 270° = West), y: top/bottom position in degrees (-90° = bottom, 0° = front, 90° = top), z: zoom (0 = wide, 100 = zoomed in) }
|
|
129
|
+
<a name="Panoramax.components.ui.Photo+getPictureOriginalHeading"></a>
|
|
130
|
+
|
|
131
|
+
### photo.getPictureOriginalHeading() ⇒ <code>number</code>
|
|
132
|
+
Get capture orientation of current picture, based on its GPS.
|
|
133
|
+
|
|
134
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
135
|
+
**Returns**: <code>number</code> - Picture original heading in degrees (0 to 360°)
|
|
136
|
+
<a name="Panoramax.components.ui.Photo+getPictureRelativeHeading"></a>
|
|
137
|
+
|
|
138
|
+
### photo.getPictureRelativeHeading() ⇒ <code>number</code>
|
|
139
|
+
Computes the relative heading of currently selected picture.
|
|
140
|
+
This gives the angle of capture compared to sequence path (vehicle movement).
|
|
141
|
+
|
|
142
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
143
|
+
**Returns**: <code>number</code> - Relative heading in degrees (-180 to 180)
|
|
144
|
+
<a name="Panoramax.components.ui.Photo+clearPictureMetadataCache"></a>
|
|
145
|
+
|
|
146
|
+
### photo.clearPictureMetadataCache()
|
|
147
|
+
Clears the Photo Sphere Viewer metadata cache.
|
|
148
|
+
It is useful when current picture or sequence has changed server-side after first load.
|
|
149
|
+
|
|
150
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
151
|
+
<a name="Panoramax.components.ui.Photo+setXYZ"></a>
|
|
152
|
+
|
|
153
|
+
### photo.setXYZ(x, y, z)
|
|
154
|
+
Change the shown position in picture
|
|
155
|
+
|
|
156
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
157
|
+
|
|
158
|
+
| Param | Type | Description |
|
|
159
|
+
| --- | --- | --- |
|
|
160
|
+
| x | <code>number</code> | X position (in degrees) |
|
|
161
|
+
| y | <code>number</code> | Y position (in degrees) |
|
|
162
|
+
| z | <code>number</code> | Z position (0-100) |
|
|
163
|
+
|
|
164
|
+
<a name="Panoramax.components.ui.Photo+setHigherContrast"></a>
|
|
165
|
+
|
|
166
|
+
### photo.setHigherContrast(enable)
|
|
167
|
+
Enable or disable higher contrast on picture
|
|
168
|
+
|
|
169
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
170
|
+
|
|
171
|
+
| Param | Type | Description |
|
|
172
|
+
| --- | --- | --- |
|
|
173
|
+
| enable | <code>boolean</code> | True to enable higher contrast |
|
|
174
|
+
|
|
175
|
+
<a name="Panoramax.components.ui.Photo+getTransitionDuration"></a>
|
|
176
|
+
|
|
177
|
+
### photo.getTransitionDuration() ⇒ <code>number</code>
|
|
178
|
+
Get the duration of stay on a picture during a sequence play.
|
|
179
|
+
|
|
180
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
181
|
+
**Returns**: <code>number</code> - The duration (in milliseconds)
|
|
182
|
+
<a name="Panoramax.components.ui.Photo+setTransitionDuration"></a>
|
|
183
|
+
|
|
184
|
+
### photo.setTransitionDuration(value)
|
|
185
|
+
Changes the duration of stay on a picture during a sequence play.
|
|
186
|
+
|
|
187
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
188
|
+
|
|
189
|
+
| Param | Type | Description |
|
|
190
|
+
| --- | --- | --- |
|
|
191
|
+
| value | <code>number</code> | The new duration (in milliseconds, between 100 and 3000) |
|
|
192
|
+
|
|
193
|
+
<a name="Panoramax.components.ui.Photo+showErrorOverlay"></a>
|
|
194
|
+
|
|
195
|
+
### photo.showErrorOverlay(e, label, dissmisable)
|
|
196
|
+
Display an error message to user on screen
|
|
197
|
+
|
|
198
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
199
|
+
|
|
200
|
+
| Param | Type | Description |
|
|
201
|
+
| --- | --- | --- |
|
|
202
|
+
| e | <code>object</code> | The initial error |
|
|
203
|
+
| label | <code>str</code> | The main error label to display |
|
|
204
|
+
| dissmisable | <code>boolean</code> | Is error dissmisable |
|
|
205
|
+
|
|
206
|
+
<a name="Panoramax.components.ui.Photo+playSequence"></a>
|
|
207
|
+
|
|
208
|
+
### photo.playSequence()
|
|
209
|
+
Goes continuously to next picture in sequence as long as possible
|
|
210
|
+
|
|
211
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
212
|
+
<a name="Panoramax.components.ui.Photo+stopSequence"></a>
|
|
213
|
+
|
|
214
|
+
### photo.stopSequence()
|
|
215
|
+
Stops playing current sequence
|
|
216
|
+
|
|
217
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
218
|
+
<a name="Panoramax.components.ui.Photo+isSequencePlaying"></a>
|
|
219
|
+
|
|
220
|
+
### photo.isSequencePlaying() ⇒ <code>boolean</code>
|
|
221
|
+
Is there any sequence being played right now ?
|
|
222
|
+
|
|
223
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
224
|
+
**Returns**: <code>boolean</code> - True if sequence is playing
|
|
225
|
+
<a name="Panoramax.components.ui.Photo+toggleSequencePlaying"></a>
|
|
226
|
+
|
|
227
|
+
### photo.toggleSequencePlaying()
|
|
228
|
+
Starts/stops the reading of pictures in a sequence
|
|
229
|
+
|
|
230
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
231
|
+
<a name="Panoramax.components.ui.Photo+getPicturesNavigation"></a>
|
|
232
|
+
|
|
233
|
+
### photo.getPicturesNavigation() ⇒ <code>string</code>
|
|
234
|
+
Get current pictures navigation mode.
|
|
235
|
+
|
|
236
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
237
|
+
**Returns**: <code>string</code> - The picture navigation mode ("any": no restriction, "seq": only pictures in same sequence, "pic": only selected picture)
|
|
238
|
+
<a name="Panoramax.components.ui.Photo+setPicturesNavigation"></a>
|
|
239
|
+
|
|
240
|
+
### photo.setPicturesNavigation(pn)
|
|
241
|
+
Switch the allowed navigation between pictures.
|
|
242
|
+
|
|
243
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
244
|
+
|
|
245
|
+
| Param | Type | Description |
|
|
246
|
+
| --- | --- | --- |
|
|
247
|
+
| pn | <code>string</code> | The picture navigation mode ("any": no restriction, "seq": only pictures in same sequence, "pic": only selected picture) |
|
|
248
|
+
|
|
249
|
+
<a name="Panoramax.components.ui.Photo+forceRefresh"></a>
|
|
250
|
+
|
|
251
|
+
### photo.forceRefresh()
|
|
252
|
+
Force reload of texture and tiles.
|
|
253
|
+
|
|
254
|
+
**Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
255
|
+
<a name="Panoramax.components.ui.Photo+event_ready"></a>
|
|
256
|
+
|
|
257
|
+
### "ready"
|
|
258
|
+
Triggered once when the panorama image has been loaded and the viewer is ready to perform the first render.
|
|
259
|
+
|
|
260
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
261
|
+
**See**: [Photo Sphere Viewer documentation](https://photo-sphere-viewer.js.org/guide/events.html#ready)
|
|
262
|
+
<a name="Panoramax.components.ui.Photo+event_picture-loading"></a>
|
|
263
|
+
|
|
264
|
+
### "picture-loading"
|
|
265
|
+
Event for picture starting to load
|
|
266
|
+
|
|
267
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
268
|
+
**Properties**
|
|
269
|
+
|
|
270
|
+
| Name | Type | Description |
|
|
271
|
+
| --- | --- | --- |
|
|
272
|
+
| detail.picId | <code>string</code> | The picture unique identifier |
|
|
273
|
+
| detail.lon | <code>number</code> | Longitude (WGS84) |
|
|
274
|
+
| detail.lat | <code>number</code> | Latitude (WGS84) |
|
|
275
|
+
| detail.x | <code>number</code> | New x position (in degrees, 0-360), corresponds to heading (0° = North, 90° = East, 180° = South, 270° = West) |
|
|
276
|
+
| detail.y | <code>number</code> | New y position (in degrees) |
|
|
277
|
+
| detail.z | <code>number</code> | New z position (0-100) |
|
|
278
|
+
| detail.first | <code>boolean</code> | True if first picture loaded |
|
|
279
|
+
|
|
280
|
+
<a name="Panoramax.components.ui.Photo+event_picture-preview-started"></a>
|
|
281
|
+
|
|
282
|
+
### "picture-preview-started"
|
|
283
|
+
Event for picture preview
|
|
284
|
+
|
|
285
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
286
|
+
**Properties**
|
|
287
|
+
|
|
288
|
+
| Name | Type | Description |
|
|
289
|
+
| --- | --- | --- |
|
|
290
|
+
| detail.picId | <code>string</code> | The picture ID |
|
|
291
|
+
| detail.coordinates | <code>Array.<number></code> | [x,y] coordinates |
|
|
292
|
+
| detail.direction | <code>number</code> | The theorical picture orientation |
|
|
293
|
+
|
|
294
|
+
<a name="Panoramax.components.ui.Photo+event_picture-preview-stopped"></a>
|
|
295
|
+
|
|
296
|
+
### "picture-preview-stopped"
|
|
297
|
+
Event for end of picture preview
|
|
298
|
+
|
|
299
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
300
|
+
**Properties**
|
|
301
|
+
|
|
302
|
+
| Name | Type | Description |
|
|
303
|
+
| --- | --- | --- |
|
|
304
|
+
| detail.picId | <code>string</code> | The picture ID |
|
|
305
|
+
|
|
306
|
+
<a name="Panoramax.components.ui.Photo+event_view-rotated"></a>
|
|
307
|
+
|
|
308
|
+
### "view-rotated"
|
|
309
|
+
Event for viewer rotation
|
|
310
|
+
|
|
311
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
312
|
+
**Properties**
|
|
313
|
+
|
|
314
|
+
| Name | Type | Description |
|
|
315
|
+
| --- | --- | --- |
|
|
316
|
+
| detail.x | <code>number</code> | New x position (in degrees, 0-360), corresponds to heading (0° = North, 90° = East, 180° = South, 270° = West) |
|
|
317
|
+
| detail.y | <code>number</code> | New y position (in degrees) |
|
|
318
|
+
| detail.z | <code>number</code> | New Z position (between 0 and 100) |
|
|
319
|
+
|
|
320
|
+
<a name="Panoramax.components.ui.Photo+event_picture-loaded"></a>
|
|
321
|
+
|
|
322
|
+
### "picture-loaded"
|
|
323
|
+
Event for picture load (low-resolution image is loaded)
|
|
324
|
+
|
|
325
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
326
|
+
**Properties**
|
|
327
|
+
|
|
328
|
+
| Name | Type | Description |
|
|
329
|
+
| --- | --- | --- |
|
|
330
|
+
| detail.picId | <code>string</code> | The picture unique identifier |
|
|
331
|
+
| detail.lon | <code>number</code> | Longitude (WGS84) |
|
|
332
|
+
| detail.lat | <code>number</code> | Latitude (WGS84) |
|
|
333
|
+
| detail.x | <code>number</code> | New x position (in degrees, 0-360), corresponds to heading (0° = North, 90° = East, 180° = South, 270° = West) |
|
|
334
|
+
| detail.y | <code>number</code> | New y position (in degrees) |
|
|
335
|
+
| detail.z | <code>number</code> | New z position (0-100) |
|
|
336
|
+
| detail.first | <code>boolean</code> | True if first picture loaded |
|
|
337
|
+
|
|
338
|
+
<a name="Panoramax.components.ui.Photo+event_picture-tiles-loaded"></a>
|
|
339
|
+
|
|
340
|
+
### "picture-tiles-loaded"
|
|
341
|
+
Event launched when all visible tiles of a picture are loaded
|
|
342
|
+
|
|
343
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
344
|
+
**Properties**
|
|
345
|
+
|
|
346
|
+
| Name | Type | Description |
|
|
347
|
+
| --- | --- | --- |
|
|
348
|
+
| detail.picId | <code>string</code> | The picture unique identifier |
|
|
349
|
+
|
|
350
|
+
<a name="Panoramax.components.ui.Photo+event_transition-duration-changed"></a>
|
|
351
|
+
|
|
352
|
+
### "transition-duration-changed"
|
|
353
|
+
Event for transition duration change
|
|
354
|
+
|
|
355
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
356
|
+
**Properties**
|
|
357
|
+
|
|
358
|
+
| Name | Type | Description |
|
|
359
|
+
| --- | --- | --- |
|
|
360
|
+
| detail.duration | <code>string</code> | New duration (in milliseconds) |
|
|
361
|
+
|
|
362
|
+
<a name="Panoramax.components.ui.Photo+event_sequence-playing"></a>
|
|
363
|
+
|
|
364
|
+
### "sequence-playing"
|
|
365
|
+
Event for sequence starting to play
|
|
366
|
+
|
|
367
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
368
|
+
<a name="Panoramax.components.ui.Photo+event_sequence-stopped"></a>
|
|
369
|
+
|
|
370
|
+
### "sequence-stopped"
|
|
371
|
+
Event for sequence stopped playing
|
|
372
|
+
|
|
373
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
374
|
+
<a name="Panoramax.components.ui.Photo+event_pictures-navigation-changed"></a>
|
|
375
|
+
|
|
376
|
+
### "pictures-navigation-changed"
|
|
377
|
+
Event for pictures navigation mode change
|
|
378
|
+
|
|
379
|
+
**Kind**: event emitted by [<code>Photo</code>](#Panoramax.components.ui.Photo)
|
|
380
|
+
**Properties**
|
|
381
|
+
|
|
382
|
+
| Name | Type | Description |
|
|
383
|
+
| --- | --- | --- |
|
|
384
|
+
| detail.value | <code>string</code> | New mode (any, pic, seq) |
|
|
385
|
+
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.Popup"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.Popup ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Emits**: [<code>open</code>](#Panoramax.components.ui.Popup+event_open), [<code>close</code>](#Panoramax.components.ui.Popup+event_close)
|
|
7
|
+
**Element**: pnx-popup
|
|
8
|
+
|
|
9
|
+
* [.Popup](#Panoramax.components.ui.Popup) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
10
|
+
* [new Popup()](#new_Panoramax.components.ui.Popup_new)
|
|
11
|
+
* [.properties](#Panoramax.components.ui.Popup+properties) : <code>Object</code>
|
|
12
|
+
* [.close()](#Panoramax.components.ui.Popup+close)
|
|
13
|
+
* ["open"](#Panoramax.components.ui.Popup+event_open)
|
|
14
|
+
* ["close"](#Panoramax.components.ui.Popup+event_close)
|
|
15
|
+
|
|
16
|
+
<a name="new_Panoramax.components.ui.Popup_new"></a>
|
|
17
|
+
|
|
18
|
+
### new Popup()
|
|
19
|
+
Popup Element displays a full overlay container.
|
|
20
|
+
|
|
21
|
+
**Example**
|
|
22
|
+
```html
|
|
23
|
+
<pnx-popup @close=${() => alert("closed")}>
|
|
24
|
+
<h3>Popup content</h3>
|
|
25
|
+
</pnx-popup>
|
|
26
|
+
```
|
|
27
|
+
<a name="Panoramax.components.ui.Popup+properties"></a>
|
|
28
|
+
|
|
29
|
+
### popup.properties : <code>Object</code>
|
|
30
|
+
Component properties.
|
|
31
|
+
|
|
32
|
+
**Kind**: instance property of [<code>Popup</code>](#Panoramax.components.ui.Popup)
|
|
33
|
+
**Properties**
|
|
34
|
+
|
|
35
|
+
| Name | Type | Default | Description |
|
|
36
|
+
| --- | --- | --- | --- |
|
|
37
|
+
| [visible] | <code>boolean</code> | <code>true</code> | Is the popup visible to user ? |
|
|
38
|
+
|
|
39
|
+
<a name="Panoramax.components.ui.Popup+close"></a>
|
|
40
|
+
|
|
41
|
+
### popup.close()
|
|
42
|
+
Close popup
|
|
43
|
+
|
|
44
|
+
**Kind**: instance method of [<code>Popup</code>](#Panoramax.components.ui.Popup)
|
|
45
|
+
<a name="Panoramax.components.ui.Popup+event_open"></a>
|
|
46
|
+
|
|
47
|
+
### "open"
|
|
48
|
+
Event for popup opening
|
|
49
|
+
|
|
50
|
+
**Kind**: event emitted by [<code>Popup</code>](#Panoramax.components.ui.Popup)
|
|
51
|
+
<a name="Panoramax.components.ui.Popup+event_close"></a>
|
|
52
|
+
|
|
53
|
+
### "close"
|
|
54
|
+
Event for popup closing
|
|
55
|
+
|
|
56
|
+
**Kind**: event emitted by [<code>Popup</code>](#Panoramax.components.ui.Popup)
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.ProgressBar"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.ProgressBar ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Element**: pnx-progress-bar
|
|
7
|
+
|
|
8
|
+
* [.ProgressBar](#Panoramax.components.ui.ProgressBar) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
9
|
+
* [new ProgressBar()](#new_Panoramax.components.ui.ProgressBar_new)
|
|
10
|
+
* [.properties](#Panoramax.components.ui.ProgressBar+properties) : <code>Object</code>
|
|
11
|
+
|
|
12
|
+
<a name="new_Panoramax.components.ui.ProgressBar_new"></a>
|
|
13
|
+
|
|
14
|
+
### new ProgressBar()
|
|
15
|
+
Progress bar with nice styling.
|
|
16
|
+
|
|
17
|
+
**Example**
|
|
18
|
+
```html
|
|
19
|
+
<pnx-loader value="42" ._t=${viewer._t} />
|
|
20
|
+
```
|
|
21
|
+
<a name="Panoramax.components.ui.ProgressBar+properties"></a>
|
|
22
|
+
|
|
23
|
+
### progressBar.properties : <code>Object</code>
|
|
24
|
+
Component properties.
|
|
25
|
+
|
|
26
|
+
**Kind**: instance property of [<code>ProgressBar</code>](#Panoramax.components.ui.ProgressBar)
|
|
27
|
+
**Properties**
|
|
28
|
+
|
|
29
|
+
| Name | Type | Description |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| [value] | <code>number</code> | Progress bar percentage (0-100) or empty for indeterminate state |
|
|
32
|
+
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.QualityScore"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.QualityScore ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Emits**: [<code>change</code>](#Panoramax.components.ui.QualityScore+event_change)
|
|
7
|
+
**Element**: pnx-quality-score
|
|
8
|
+
|
|
9
|
+
* [.QualityScore](#Panoramax.components.ui.QualityScore) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
10
|
+
* [new QualityScore()](#new_Panoramax.components.ui.QualityScore_new)
|
|
11
|
+
* [.properties](#Panoramax.components.ui.QualityScore+properties) : <code>Object</code>
|
|
12
|
+
* ["change"](#Panoramax.components.ui.QualityScore+event_change)
|
|
13
|
+
|
|
14
|
+
<a name="new_Panoramax.components.ui.QualityScore_new"></a>
|
|
15
|
+
|
|
16
|
+
### new QualityScore()
|
|
17
|
+
Quality Score element displays the picture quality grade.
|
|
18
|
+
|
|
19
|
+
**Example**
|
|
20
|
+
```html
|
|
21
|
+
<!-- Read-only -->
|
|
22
|
+
<pnx-quality-score grade="5" ._t=${viewer._t} />
|
|
23
|
+
|
|
24
|
+
<!-- Input -->
|
|
25
|
+
<pnx-quality-score grade="5" input="pnx-qs-input" @change=${() => alert('changed')} ._t=${viewer._t} />
|
|
26
|
+
```
|
|
27
|
+
<a name="Panoramax.components.ui.QualityScore+properties"></a>
|
|
28
|
+
|
|
29
|
+
### qualityScore.properties : <code>Object</code>
|
|
30
|
+
Component properties.
|
|
31
|
+
|
|
32
|
+
**Kind**: instance property of [<code>QualityScore</code>](#Panoramax.components.ui.QualityScore)
|
|
33
|
+
**Properties**
|
|
34
|
+
|
|
35
|
+
| Name | Type | Default | Description |
|
|
36
|
+
| --- | --- | --- | --- |
|
|
37
|
+
| [grade] | <code>number</code> \| <code>string</code> | <code>0</code> | The grade (5=A, 1=E, 0=none selected), or a list of grades |
|
|
38
|
+
| [input] | <code>string</code> | <code>false</code> | If set, score is an input and value is used as ID prefix |
|
|
39
|
+
|
|
40
|
+
<a name="Panoramax.components.ui.QualityScore+event_change"></a>
|
|
41
|
+
|
|
42
|
+
### "change"
|
|
43
|
+
Event for grade change
|
|
44
|
+
|
|
45
|
+
**Kind**: event emitted by [<code>QualityScore</code>](#Panoramax.components.ui.QualityScore)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.SearchBar"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.SearchBar ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Emits**: [<code>result</code>](#Panoramax.components.ui.SearchBar+event_result)
|
|
7
|
+
**Element**: pnx-search-bar
|
|
8
|
+
|
|
9
|
+
* [.SearchBar](#Panoramax.components.ui.SearchBar) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
10
|
+
* [new SearchBar()](#new_Panoramax.components.ui.SearchBar_new)
|
|
11
|
+
* [.properties](#Panoramax.components.ui.SearchBar+properties) : <code>Object</code>
|
|
12
|
+
* ["result"](#Panoramax.components.ui.SearchBar+event_result)
|
|
13
|
+
|
|
14
|
+
<a name="new_Panoramax.components.ui.SearchBar_new"></a>
|
|
15
|
+
|
|
16
|
+
### new SearchBar()
|
|
17
|
+
Search Bar Element displays an interactive search widget.
|
|
18
|
+
|
|
19
|
+
**Example**
|
|
20
|
+
```html
|
|
21
|
+
<pnx-search-bar
|
|
22
|
+
id="my-search-bar"
|
|
23
|
+
placeholder="Search something..."
|
|
24
|
+
.searcher=${mysearchfct}
|
|
25
|
+
._parent=${viewer}
|
|
26
|
+
reduceable="false"
|
|
27
|
+
reduced="false"
|
|
28
|
+
size="xxl" @result=${e => console.log(e.detail)}
|
|
29
|
+
>
|
|
30
|
+
<!-- Optional icon for display on left-side of search bar -->
|
|
31
|
+
</pnx-search-bar>
|
|
32
|
+
```
|
|
33
|
+
<a name="Panoramax.components.ui.SearchBar+properties"></a>
|
|
34
|
+
|
|
35
|
+
### searchBar.properties : <code>Object</code>
|
|
36
|
+
Component properties.
|
|
37
|
+
|
|
38
|
+
**Kind**: instance property of [<code>SearchBar</code>](#Panoramax.components.ui.SearchBar)
|
|
39
|
+
**Properties**
|
|
40
|
+
|
|
41
|
+
| Name | Type | Default | Description |
|
|
42
|
+
| --- | --- | --- | --- |
|
|
43
|
+
| [id] | <code>string</code> | | The ID attribute set on component and prefix for input as well |
|
|
44
|
+
| [placeholder] | <code>string</code> | | Default text to display on empty field |
|
|
45
|
+
| [reduceable] | <code>boolean</code> | <code>false</code> | Can the search bar be collapsed (for mobile view) |
|
|
46
|
+
| [reduced] | <code>boolean</code> | <code>false</code> | Is the search bar currently collapsed ? |
|
|
47
|
+
| [value] | <code>string</code> | | The default input value |
|
|
48
|
+
| [size] | <code>string</code> | <code>"md"</code> | The component sizing (md, xxl) |
|
|
49
|
+
| [searcher] | <code>function</code> | | Search callback, function that takes as parameter the input text value, and resolves on list of results ({title, subtitle} and any other data you'd like to get on validation) |
|
|
50
|
+
| [no-menu-closure] | <code>boolean</code> | <code>false</code> | Set to true to ignore menu closure events |
|
|
51
|
+
|
|
52
|
+
<a name="Panoramax.components.ui.SearchBar+event_result"></a>
|
|
53
|
+
|
|
54
|
+
### "result"
|
|
55
|
+
Event for search result clicked
|
|
56
|
+
|
|
57
|
+
**Kind**: event emitted by [<code>SearchBar</code>](#Panoramax.components.ui.SearchBar)
|
|
58
|
+
**Properties**
|
|
59
|
+
|
|
60
|
+
| Name | Type | Description |
|
|
61
|
+
| --- | --- | --- |
|
|
62
|
+
| detail | <code>object</code> \| <code>null</code> | The data associated to clicked item (format based on searcher function results), or null on reset |
|
|
63
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.TogglableGroup"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.TogglableGroup ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Element**: pnx-togglable-group
|
|
7
|
+
**Slot**: `button` The button on which click leads to open/close menu
|
|
8
|
+
**Slot**: `default` The menu to make shown/hidden on button click
|
|
9
|
+
|
|
10
|
+
* [.TogglableGroup](#Panoramax.components.ui.TogglableGroup) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
11
|
+
* [new TogglableGroup()](#new_Panoramax.components.ui.TogglableGroup_new)
|
|
12
|
+
* [.properties](#Panoramax.components.ui.TogglableGroup+properties) : <code>Object</code>
|
|
13
|
+
|
|
14
|
+
<a name="new_Panoramax.components.ui.TogglableGroup_new"></a>
|
|
15
|
+
|
|
16
|
+
### new TogglableGroup()
|
|
17
|
+
Togglable Group element allows to make a menu appear/disappear based on button click.
|
|
18
|
+
|
|
19
|
+
**Example**
|
|
20
|
+
```html
|
|
21
|
+
<pnx-togglable-group padded="false" ._parent=${viewer}>
|
|
22
|
+
<pnx-button slot="button">
|
|
23
|
+
Open menu
|
|
24
|
+
</pnx-button>
|
|
25
|
+
<div>Menu content</div>
|
|
26
|
+
</pnx-togglable-group>
|
|
27
|
+
```
|
|
28
|
+
<a name="Panoramax.components.ui.TogglableGroup+properties"></a>
|
|
29
|
+
|
|
30
|
+
### togglableGroup.properties : <code>Object</code>
|
|
31
|
+
Component properties.
|
|
32
|
+
|
|
33
|
+
**Kind**: instance property of [<code>TogglableGroup</code>](#Panoramax.components.ui.TogglableGroup)
|
|
34
|
+
**Properties**
|
|
35
|
+
|
|
36
|
+
| Name | Type | Description |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| [padded] | <code>string</code> | If set, adds a 15px padding to the menu panel. |
|
|
39
|
+
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<a name="Panoramax.components.ui.widgets.GeoSearch"></a>
|
|
2
|
+
|
|
3
|
+
## Panoramax.components.ui.widgets.GeoSearch ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
4
|
+
**Kind**: static class of <code>Panoramax.components.ui.widgets</code>
|
|
5
|
+
**Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
6
|
+
**Element**: pnx-widget-geosearch
|
|
7
|
+
|
|
8
|
+
* [.GeoSearch](#Panoramax.components.ui.widgets.GeoSearch) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
|
|
9
|
+
* [new GeoSearch()](#new_Panoramax.components.ui.widgets.GeoSearch_new)
|
|
10
|
+
* [.properties](#Panoramax.components.ui.widgets.GeoSearch+properties) : <code>Object</code>
|
|
11
|
+
|
|
12
|
+
<a name="new_Panoramax.components.ui.widgets.GeoSearch_new"></a>
|
|
13
|
+
|
|
14
|
+
### new GeoSearch()
|
|
15
|
+
Ready-to-use geocoder search bar.
|
|
16
|
+
|
|
17
|
+
**Example**
|
|
18
|
+
```html
|
|
19
|
+
<pnx-widget-geosearch _parent=${viewer} />
|
|
20
|
+
```
|
|
21
|
+
<a name="Panoramax.components.ui.widgets.GeoSearch+properties"></a>
|
|
22
|
+
|
|
23
|
+
### geoSearch.properties : <code>Object</code>
|
|
24
|
+
Component properties.
|
|
25
|
+
|
|
26
|
+
**Kind**: instance property of [<code>GeoSearch</code>](#Panoramax.components.ui.widgets.GeoSearch)
|
|
27
|
+
**Properties**
|
|
28
|
+
|
|
29
|
+
| Name | Type | Default | Description |
|
|
30
|
+
| --- | --- | --- | --- |
|
|
31
|
+
| [geocoder] | <code>string</code> | <code>"nominatim"</code> | The geocoder engine to use (nominatim, ban) |
|
|
32
|
+
|