@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.
Files changed (255) hide show
  1. package/.gitlab-ci.yml +13 -6
  2. package/CHANGELOG.md +53 -1
  3. package/CODE_OF_CONDUCT.md +1 -1
  4. package/README.md +1 -1
  5. package/build/editor.html +10 -1
  6. package/build/index.css +12 -12
  7. package/build/index.css.map +1 -1
  8. package/build/index.html +1 -1
  9. package/build/index.js +2126 -14
  10. package/build/index.js.map +1 -1
  11. package/build/map.html +1 -1
  12. package/build/photo.html +1 -0
  13. package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff +0 -0
  14. package/build/static/media/atkinson-hyperlegible-next-latin-400-normal..woff2 +0 -0
  15. package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff +0 -0
  16. package/build/static/media/atkinson-hyperlegible-next-latin-ext-400-normal..woff2 +0 -0
  17. package/build/viewer.html +12 -1
  18. package/build/widgets.html +1 -0
  19. package/config/jest/mocks.js +201 -0
  20. package/config/paths.js +2 -0
  21. package/config/webpack.config.js +52 -0
  22. package/docs/03_URL_settings.md +14 -16
  23. package/docs/05_Compatibility.md +59 -76
  24. package/docs/09_Develop.md +46 -11
  25. package/docs/90_Releases.md +2 -2
  26. package/docs/images/class_diagram.drawio +60 -45
  27. package/docs/images/class_diagram.jpg +0 -0
  28. package/docs/images/screenshot.jpg +0 -0
  29. package/docs/index.md +135 -0
  30. package/docs/reference/components/core/Basic.md +196 -0
  31. package/docs/reference/components/core/CoverageMap.md +210 -0
  32. package/docs/reference/components/core/Editor.md +224 -0
  33. package/docs/reference/components/core/PhotoViewer.md +307 -0
  34. package/docs/reference/components/core/Viewer.md +350 -0
  35. package/docs/reference/components/layout/BottomDrawer.md +35 -0
  36. package/docs/reference/components/layout/CorneredGrid.md +29 -0
  37. package/docs/reference/components/layout/Mini.md +45 -0
  38. package/docs/reference/components/layout/Tabs.md +45 -0
  39. package/docs/reference/components/menus/MapBackground.md +32 -0
  40. package/docs/reference/components/menus/MapFilters.md +15 -0
  41. package/docs/reference/components/menus/MapLayers.md +15 -0
  42. package/docs/reference/components/menus/MapLegend.md +15 -0
  43. package/docs/reference/components/menus/PictureLegend.md +16 -0
  44. package/docs/reference/components/menus/PictureMetadata.md +15 -0
  45. package/docs/reference/components/menus/PlayerOptions.md +15 -0
  46. package/docs/reference/components/menus/QualityScoreDoc.md +15 -0
  47. package/docs/reference/components/menus/ReportForm.md +15 -0
  48. package/docs/reference/components/menus/ShareMenu.md +15 -0
  49. package/docs/reference/components/ui/Button.md +40 -0
  50. package/docs/reference/components/ui/ButtonGroup.md +36 -0
  51. package/docs/reference/components/ui/CopyButton.md +38 -0
  52. package/docs/reference/components/ui/Grade.md +32 -0
  53. package/docs/reference/components/ui/LinkButton.md +45 -0
  54. package/docs/reference/components/ui/ListGroup.md +22 -0
  55. package/docs/reference/components/ui/Loader.md +56 -0
  56. package/docs/reference/components/ui/Map.md +239 -0
  57. package/docs/reference/components/ui/MapMore.md +256 -0
  58. package/docs/reference/components/ui/Photo.md +385 -0
  59. package/docs/reference/components/ui/Popup.md +56 -0
  60. package/docs/reference/components/ui/ProgressBar.md +32 -0
  61. package/docs/reference/components/ui/QualityScore.md +45 -0
  62. package/docs/reference/components/ui/SearchBar.md +63 -0
  63. package/docs/reference/components/ui/TogglableGroup.md +39 -0
  64. package/docs/reference/components/ui/widgets/GeoSearch.md +32 -0
  65. package/docs/reference/components/ui/widgets/Legend.md +49 -0
  66. package/docs/reference/components/ui/widgets/MapFiltersButton.md +33 -0
  67. package/docs/reference/components/ui/widgets/MapLayersButton.md +15 -0
  68. package/docs/reference/components/ui/widgets/OSMEditors.md +15 -0
  69. package/docs/reference/components/ui/widgets/PictureLegendActions.md +32 -0
  70. package/docs/reference/components/ui/widgets/Player.md +33 -0
  71. package/docs/reference/components/ui/widgets/Zoom.md +15 -0
  72. package/docs/reference/utils/API.md +334 -0
  73. package/docs/reference/utils/InitParameters.md +68 -0
  74. package/docs/reference/utils/URLHandler.md +107 -0
  75. package/docs/reference.md +79 -0
  76. package/docs/shortcuts.md +11 -0
  77. package/docs/tutorials/aerial_imagery.md +19 -0
  78. package/docs/tutorials/authentication.md +10 -0
  79. package/docs/tutorials/custom_widgets.md +59 -0
  80. package/docs/tutorials/map_style.md +39 -0
  81. package/docs/tutorials/migrate_v4.md +153 -0
  82. package/docs/tutorials/synced_coverage.md +43 -0
  83. package/mkdocs.yml +66 -5
  84. package/package.json +22 -17
  85. package/public/editor.html +21 -29
  86. package/public/index.html +17 -12
  87. package/public/map.html +19 -18
  88. package/public/photo.html +55 -0
  89. package/public/viewer.html +22 -26
  90. package/public/widgets.html +306 -0
  91. package/scripts/doc.js +79 -0
  92. package/src/components/core/Basic.css +48 -0
  93. package/src/components/core/Basic.js +349 -0
  94. package/src/components/core/CoverageMap.css +9 -0
  95. package/src/components/core/CoverageMap.js +139 -0
  96. package/src/components/core/Editor.css +23 -0
  97. package/src/components/core/Editor.js +390 -0
  98. package/src/components/core/PhotoViewer.css +48 -0
  99. package/src/components/core/PhotoViewer.js +499 -0
  100. package/src/components/core/Viewer.css +98 -0
  101. package/src/components/core/Viewer.js +564 -0
  102. package/src/components/core/index.js +12 -0
  103. package/src/components/index.js +13 -0
  104. package/src/components/layout/BottomDrawer.js +257 -0
  105. package/src/components/layout/CorneredGrid.js +112 -0
  106. package/src/components/layout/Mini.js +117 -0
  107. package/src/components/layout/Tabs.js +133 -0
  108. package/src/components/layout/index.js +9 -0
  109. package/src/components/menus/MapBackground.js +106 -0
  110. package/src/components/menus/MapFilters.js +400 -0
  111. package/src/components/menus/MapLayers.js +143 -0
  112. package/src/components/menus/MapLegend.js +34 -0
  113. package/src/components/menus/PictureLegend.js +257 -0
  114. package/src/components/menus/PictureMetadata.js +317 -0
  115. package/src/components/menus/PlayerOptions.js +95 -0
  116. package/src/components/menus/QualityScoreDoc.js +36 -0
  117. package/src/components/menus/ReportForm.js +133 -0
  118. package/src/components/menus/Share.js +100 -0
  119. package/src/components/menus/index.js +15 -0
  120. package/src/components/styles.js +383 -0
  121. package/src/components/ui/Button.js +77 -0
  122. package/src/components/ui/ButtonGroup.css +57 -0
  123. package/src/components/ui/ButtonGroup.js +68 -0
  124. package/src/components/ui/CopyButton.js +106 -0
  125. package/src/components/ui/Grade.js +54 -0
  126. package/src/components/ui/LinkButton.js +67 -0
  127. package/src/components/ui/ListGroup.js +66 -0
  128. package/src/components/ui/Loader.js +203 -0
  129. package/src/components/{Map.css → ui/Map.css} +5 -17
  130. package/src/components/{Map.js → ui/Map.js} +148 -156
  131. package/src/components/ui/MapMore.js +324 -0
  132. package/src/components/{Photo.css → ui/Photo.css} +6 -6
  133. package/src/components/{Photo.js → ui/Photo.js} +313 -101
  134. package/src/components/ui/Popup.js +145 -0
  135. package/src/components/ui/ProgressBar.js +104 -0
  136. package/src/components/ui/QualityScore.js +147 -0
  137. package/src/components/ui/SearchBar.js +367 -0
  138. package/src/components/ui/TogglableGroup.js +157 -0
  139. package/src/components/ui/index.js +22 -0
  140. package/src/components/ui/widgets/GeoSearch.css +21 -0
  141. package/src/components/ui/widgets/GeoSearch.js +139 -0
  142. package/src/components/ui/widgets/Legend.js +113 -0
  143. package/src/components/ui/widgets/MapFiltersButton.js +104 -0
  144. package/src/components/ui/widgets/MapLayersButton.js +79 -0
  145. package/src/components/ui/widgets/OSMEditors.js +155 -0
  146. package/src/components/ui/widgets/PictureLegendActions.js +117 -0
  147. package/src/components/ui/widgets/Player.css +7 -0
  148. package/src/components/ui/widgets/Player.js +151 -0
  149. package/src/components/ui/widgets/Zoom.js +82 -0
  150. package/src/components/ui/widgets/index.js +13 -0
  151. package/src/img/loader_base.jpg +0 -0
  152. package/src/img/panoramax.svg +13 -0
  153. package/src/img/switch_big.svg +20 -10
  154. package/src/index.js +7 -9
  155. package/src/translations/br.json +1 -0
  156. package/src/translations/da.json +38 -15
  157. package/src/translations/de.json +5 -3
  158. package/src/translations/en.json +35 -15
  159. package/src/translations/eo.json +38 -15
  160. package/src/translations/es.json +1 -1
  161. package/src/translations/fr.json +36 -16
  162. package/src/translations/hu.json +1 -1
  163. package/src/translations/it.json +39 -16
  164. package/src/translations/ja.json +182 -1
  165. package/src/translations/nl.json +106 -6
  166. package/src/translations/pl.json +1 -1
  167. package/src/translations/sv.json +182 -0
  168. package/src/translations/zh_Hant.json +35 -14
  169. package/src/utils/API.js +109 -49
  170. package/src/utils/InitParameters.js +388 -0
  171. package/src/utils/PhotoAdapter.js +1 -0
  172. package/src/utils/URLHandler.js +362 -0
  173. package/src/utils/geocoder.js +152 -0
  174. package/src/utils/{I18n.js → i18n.js} +7 -3
  175. package/src/utils/index.js +11 -0
  176. package/src/utils/{Map.js → map.js} +256 -77
  177. package/src/utils/picture.js +442 -0
  178. package/src/utils/utils.js +324 -0
  179. package/src/utils/widgets.js +55 -0
  180. package/tests/components/core/Basic.test.js +121 -0
  181. package/tests/components/core/BasicMock.js +25 -0
  182. package/tests/components/core/CoverageMap.test.js +20 -0
  183. package/tests/components/core/Editor.test.js +20 -0
  184. package/tests/components/core/PhotoViewer.test.js +57 -0
  185. package/tests/components/core/Viewer.test.js +84 -0
  186. package/tests/components/core/__snapshots__/PhotoViewer.test.js.snap +73 -0
  187. package/tests/components/core/__snapshots__/Viewer.test.js.snap +145 -0
  188. package/tests/components/ui/CopyButton.test.js +52 -0
  189. package/tests/components/ui/Loader.test.js +55 -0
  190. package/tests/components/{Map.test.js → ui/Map.test.js} +73 -61
  191. package/tests/components/{Photo.test.js → ui/Photo.test.js} +97 -63
  192. package/tests/components/ui/Popup.test.js +26 -0
  193. package/tests/components/ui/QualityScore.test.js +18 -0
  194. package/tests/components/ui/SearchBar.test.js +110 -0
  195. package/tests/components/ui/__snapshots__/CopyButton.test.js.snap +33 -0
  196. package/tests/components/ui/__snapshots__/Loader.test.js.snap +56 -0
  197. package/tests/components/{__snapshots__ → ui/__snapshots__}/Map.test.js.snap +11 -38
  198. package/tests/components/{__snapshots__ → ui/__snapshots__}/Photo.test.js.snap +70 -6
  199. package/tests/components/ui/__snapshots__/Popup.test.js.snap +29 -0
  200. package/tests/components/ui/__snapshots__/QualityScore.test.js.snap +11 -0
  201. package/tests/components/ui/__snapshots__/SearchBar.test.js.snap +65 -0
  202. package/tests/utils/API.test.js +83 -83
  203. package/tests/utils/InitParameters.test.js +499 -0
  204. package/tests/utils/URLHandler.test.js +401 -0
  205. package/tests/utils/__snapshots__/API.test.js.snap +10 -0
  206. package/tests/utils/__snapshots__/URLHandler.test.js.snap +21 -0
  207. package/tests/utils/__snapshots__/{Map.test.js.snap → geocoder.test.js.snap} +1 -1
  208. package/tests/utils/__snapshots__/map.test.js.snap +11 -0
  209. package/tests/utils/__snapshots__/picture.test.js.snap +327 -0
  210. package/tests/utils/__snapshots__/widgets.test.js.snap +19 -0
  211. package/tests/utils/geocoder.test.js +37 -0
  212. package/tests/utils/{I18n.test.js → i18n.test.js} +8 -8
  213. package/tests/utils/map.test.js +126 -0
  214. package/tests/utils/picture.test.js +745 -0
  215. package/tests/utils/utils.test.js +288 -0
  216. package/tests/utils/widgets.test.js +31 -0
  217. package/docs/01_Start.md +0 -149
  218. package/docs/02_Usage.md +0 -831
  219. package/docs/04_Advanced_examples.md +0 -216
  220. package/src/Editor.css +0 -37
  221. package/src/Editor.js +0 -361
  222. package/src/StandaloneMap.js +0 -114
  223. package/src/Viewer.css +0 -203
  224. package/src/Viewer.js +0 -1246
  225. package/src/components/CoreView.css +0 -70
  226. package/src/components/CoreView.js +0 -175
  227. package/src/components/Loader.css +0 -74
  228. package/src/components/Loader.js +0 -120
  229. package/src/img/loader_hd.jpg +0 -0
  230. package/src/utils/Exif.js +0 -193
  231. package/src/utils/Utils.js +0 -631
  232. package/src/utils/Widgets.js +0 -562
  233. package/src/viewer/URLHash.js +0 -469
  234. package/src/viewer/Widgets.css +0 -880
  235. package/src/viewer/Widgets.js +0 -1470
  236. package/tests/Editor.test.js +0 -126
  237. package/tests/StandaloneMap.test.js +0 -45
  238. package/tests/Viewer.test.js +0 -366
  239. package/tests/__snapshots__/Editor.test.js.snap +0 -298
  240. package/tests/__snapshots__/StandaloneMap.test.js.snap +0 -30
  241. package/tests/__snapshots__/Viewer.test.js.snap +0 -195
  242. package/tests/components/CoreView.test.js +0 -92
  243. package/tests/components/Loader.test.js +0 -38
  244. package/tests/components/__snapshots__/Loader.test.js.snap +0 -15
  245. package/tests/utils/Exif.test.js +0 -124
  246. package/tests/utils/Map.test.js +0 -113
  247. package/tests/utils/Utils.test.js +0 -300
  248. package/tests/utils/Widgets.test.js +0 -107
  249. package/tests/utils/__snapshots__/Exif.test.js.snap +0 -43
  250. package/tests/utils/__snapshots__/Utils.test.js.snap +0 -41
  251. package/tests/utils/__snapshots__/Widgets.test.js.snap +0 -44
  252. package/tests/viewer/URLHash.test.js +0 -559
  253. package/tests/viewer/Widgets.test.js +0 -127
  254. package/tests/viewer/__snapshots__/URLHash.test.js.snap +0 -108
  255. package/tests/viewer/__snapshots__/Widgets.test.js.snap +0 -403
@@ -0,0 +1,196 @@
1
+ <a name="Panoramax.components.core.Basic"></a>
2
+
3
+ ## Panoramax.components.core.Basic ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
4
+ **Kind**: static class of <code>Panoramax.components.core</code>
5
+ **Extends**: <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
6
+ **Emits**: [<code>select</code>](#Panoramax.components.core.Basic+event_select), [<code>ready</code>](#Panoramax.components.core.Basic+event_ready), [<code>broken</code>](#Panoramax.components.core.Basic+event_broken), [<code>menu-opened</code>](#Panoramax.components.core.Basic+event_menu-opened)
7
+ **Properties**
8
+
9
+ | Name | Type | Description |
10
+ | --- | --- | --- |
11
+ | loader | [<code>Loader</code>](../ui/Loader.md/#Panoramax.components.ui.Loader) | The loader screen |
12
+ | api | [<code>API</code>](../../utils/API.md/#Panoramax.utils.API) | The API manager |
13
+
14
+
15
+ * [.Basic](#Panoramax.components.core.Basic) ⇐ <code>[lit.LitElement](https://lit.dev/docs/api/LitElement/)</code>
16
+ * [new Basic()](#new_Panoramax.components.core.Basic_new)
17
+ * [.properties](#Panoramax.components.core.Basic+properties) : <code>Object</code>
18
+ * [.onceReady()](#Panoramax.components.core.Basic+onceReady) ⇒ <code>Promise</code>
19
+ * [.onceAPIReady()](#Panoramax.components.core.Basic+onceAPIReady) ⇒ <code>Promise</code>
20
+ * [.getClassName()](#Panoramax.components.core.Basic+getClassName) ⇒ <code>string</code>
21
+ * [.select([seqId], [picId], [force])](#Panoramax.components.core.Basic+select)
22
+ * [.isWidthSmall()](#Panoramax.components.core.Basic+isWidthSmall) ⇒ <code>boolean</code>
23
+ * [.isHeightSmall()](#Panoramax.components.core.Basic+isHeightSmall) ⇒ <code>boolean</code>
24
+ * [.getSubComponentsNames()](#Panoramax.components.core.Basic+getSubComponentsNames) ⇒ <code>Array.&lt;string&gt;</code>
25
+ * [.addEventListener(type, listener, [options])](#Panoramax.components.core.Basic+addEventListener)
26
+ * ["menu-opened"](#Panoramax.components.core.Basic+event_menu-opened)
27
+ * ["select"](#Panoramax.components.core.Basic+event_select)
28
+ * ["ready"](#Panoramax.components.core.Basic+event_ready)
29
+ * ["broken"](#Panoramax.components.core.Basic+event_broken)
30
+
31
+ <a name="new_Panoramax.components.core.Basic_new"></a>
32
+
33
+ ### new Basic()
34
+ Basic core component is a basic container for common functions through all core components.
35
+ It is not intended to be used directly, it's only to be extended by other core components.
36
+
37
+ <a name="Panoramax.components.core.Basic+properties"></a>
38
+
39
+ ### basic.properties : <code>Object</code>
40
+ Component properties.
41
+
42
+ **Kind**: instance mixin of [<code>Basic</code>](#Panoramax.components.core.Basic)
43
+ **Properties**
44
+
45
+ | Name | Type | Default | Description |
46
+ | --- | --- | --- | --- |
47
+ | endpoint | <code>string</code> | | URL to API to use (must be a [STAC API](https://github.com/radiantearth/stac-api-spec/blob/main/overview.md)) |
48
+ | [picture] | <code>string</code> | | The picture ID to display |
49
+ | [sequence] | <code>string</code> | | The sequence ID of the picture displayed |
50
+ | [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)) |
51
+ | [users] | <code>Array.&lt;string&gt;</code> | <code>[geovisio]</code> | List of users IDs to use for map display (defaults to general map, identified as "geovisio") |
52
+ | [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. |
53
+ | [lang] | <code>string</code> | | To override language used for labels. Defaults to using user's preferred languages. |
54
+
55
+ <a name="Panoramax.components.core.Basic+onceReady"></a>
56
+
57
+ ### basic.onceReady() ⇒ <code>Promise</code>
58
+ Waits for component to have its first loading done.
59
+
60
+ Each inheriting class must override this method.
61
+
62
+ **Kind**: instance method of [<code>Basic</code>](#Panoramax.components.core.Basic)
63
+ **Fulfil**: <code>null</code> When initialization is complete.
64
+ **Reject**: <code>string</code> Error message
65
+ <a name="Panoramax.components.core.Basic+onceAPIReady"></a>
66
+
67
+ ### basic.onceAPIReady() ⇒ <code>Promise</code>
68
+ Waits for initial API setup.
69
+
70
+ **Kind**: instance method of [<code>Basic</code>](#Panoramax.components.core.Basic)
71
+ **Fulfil**: <code>null</code> When API is ready.
72
+ **Reject**: <code>string</code> Error message
73
+ <a name="Panoramax.components.core.Basic+getClassName"></a>
74
+
75
+ ### basic.getClassName() ⇒ <code>string</code>
76
+ This allows to retrieve an always correct class name.
77
+ This is crap, but avoids issues with Webpack & so on.
78
+
79
+ Each inheriting class must override this method.
80
+
81
+ **Kind**: instance method of [<code>Basic</code>](#Panoramax.components.core.Basic)
82
+ **Returns**: <code>string</code> - The class name (for example "Basic")
83
+ <a name="Panoramax.components.core.Basic+select"></a>
84
+
85
+ ### basic.select([seqId], [picId], [force])
86
+ Change the currently picture and/or sequence.
87
+ Calling the method without parameters unselects.
88
+
89
+ **Kind**: instance method of [<code>Basic</code>](#Panoramax.components.core.Basic)
90
+
91
+ | Param | Type | Default | Description |
92
+ | --- | --- | --- | --- |
93
+ | [seqId] | <code>string</code> | <code>null</code> | The sequence UUID |
94
+ | [picId] | <code>string</code> | <code>null</code> | The picture UUID |
95
+ | [force] | <code>boolean</code> | <code>false</code> | Force select even if already selected |
96
+
97
+ <a name="Panoramax.components.core.Basic+isWidthSmall"></a>
98
+
99
+ ### basic.isWidthSmall() ⇒ <code>boolean</code>
100
+ Is the view running in a small container (small embed or smartphone)
101
+
102
+ **Kind**: instance method of [<code>Basic</code>](#Panoramax.components.core.Basic)
103
+ **Returns**: <code>boolean</code> - True if container is small
104
+ <a name="Panoramax.components.core.Basic+isHeightSmall"></a>
105
+
106
+ ### basic.isHeightSmall() ⇒ <code>boolean</code>
107
+ Is the view running in a small-height container (small embed or smartphone)
108
+
109
+ **Kind**: instance method of [<code>Basic</code>](#Panoramax.components.core.Basic)
110
+ **Returns**: <code>boolean</code> - True if container height is small
111
+ <a name="Panoramax.components.core.Basic+getSubComponentsNames"></a>
112
+
113
+ ### basic.getSubComponentsNames() ⇒ <code>Array.&lt;string&gt;</code>
114
+ List names of sub-components (like loader, api, map, psv) available in this component.
115
+
116
+ **Kind**: instance method of [<code>Basic</code>](#Panoramax.components.core.Basic)
117
+ **Returns**: <code>Array.&lt;string&gt;</code> - Sub-components names.
118
+ <a name="Panoramax.components.core.Basic+addEventListener"></a>
119
+
120
+ ### basic.addEventListener(type, listener, [options])
121
+ Listen to events from this components or one of its sub-components.
122
+
123
+ For example, you can listen to `map` events using prefix `map:`.
124
+
125
+ ```js
126
+ me.addEventListener("map:move", doSomething);
127
+ ```
128
+
129
+ **Kind**: instance method of [<code>Basic</code>](#Panoramax.components.core.Basic)
130
+
131
+ | Param | Type | Description |
132
+ | --- | --- | --- |
133
+ | type | <code>string</code> | The event type to listen for |
134
+ | listener | <code>function</code> | The event handler |
135
+ | [options] | <code>object</code> | [Any original addEventListener available options](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#options) |
136
+
137
+ <a name="Panoramax.components.core.Basic+event_menu-opened"></a>
138
+
139
+ ### "menu-opened"
140
+ Event for overlaying menu opening
141
+
142
+ **Kind**: event emitted by [<code>Basic</code>](#Panoramax.components.core.Basic)
143
+ **Properties**
144
+
145
+ | Name | Type | Description |
146
+ | --- | --- | --- |
147
+ | detail.menu | <code>Element</code> | The opened menu |
148
+
149
+ <a name="Panoramax.components.core.Basic+event_select"></a>
150
+
151
+ ### "select"
152
+ Event for sequence/picture selection
153
+
154
+ **Kind**: event emitted by [<code>Basic</code>](#Panoramax.components.core.Basic)
155
+ **Properties**
156
+
157
+ | Name | Type | Description |
158
+ | --- | --- | --- |
159
+ | detail.seqId | <code>string</code> | The selected sequence ID |
160
+ | detail.picId | <code>string</code> | The selected picture ID (or null if not a precise picture clicked) |
161
+ | [detail.prevSeqId] | <code>string</code> | The previously selected sequence ID (or null if none) |
162
+ | [detail.prevPicId] | <code>string</code> | The previously selected picture ID (or null if none) |
163
+
164
+ <a name="Panoramax.components.core.Basic+event_ready"></a>
165
+
166
+ ### "ready"
167
+ Event when component is ready to use.
168
+ This happens when loader screen disappear, with picture and map loaded.
169
+
170
+ To follow more precisely loading steps, you can also watch for sub-components `ready` events.
171
+ ```js
172
+ // Watch API-readiness
173
+ viewer.addEventListener("api:ready", ...); // From parent
174
+ viewer.api.addEventListener("ready", ...); // Or on sub-component
175
+ ```
176
+
177
+ **Kind**: event emitted by [<code>Basic</code>](#Panoramax.components.core.Basic)
178
+ <a name="Panoramax.components.core.Basic+event_broken"></a>
179
+
180
+ ### "broken"
181
+ Event for viewer failing to initially load.
182
+
183
+ To follow more precisely loading failures, you can also watch for sub-components `broken` events.
184
+ ```js
185
+ // Watch API breaks
186
+ viewer.addEventListener("api:broken", ...); // From parent
187
+ viewer.api.addEventListener("broken", ...); // Or on sub-component
188
+ ```
189
+
190
+ **Kind**: event emitted by [<code>Basic</code>](#Panoramax.components.core.Basic)
191
+ **Properties**
192
+
193
+ | Name | Type | Description |
194
+ | --- | --- | --- |
195
+ | detail.error | <code>string</code> | The user-friendly error message to display |
196
+
@@ -0,0 +1,210 @@
1
+ <a name="Panoramax.components.core.CoverageMap"></a>
2
+
3
+ ## Panoramax.components.core.CoverageMap ⇐ [<code>Basic</code>](Basic.md/#Panoramax.components.core.Basic)
4
+ **Kind**: static class of <code>Panoramax.components.core</code>
5
+ **Extends**: [<code>Basic</code>](Basic.md/#Panoramax.components.core.Basic)
6
+ **Emits**: [<code>select</code>](Basic.md/#Panoramax.components.core.Basic+event_select), [<code>ready</code>](Basic.md/#Panoramax.components.core.Basic+event_ready), [<code>broken</code>](Basic.md/#Panoramax.components.core.Basic+event_broken)
7
+ **Element**: pnx-coverage-map
8
+ **Properties**
9
+
10
+ | Name | Type | Description |
11
+ | --- | --- | --- |
12
+ | loader | [<code>Loader</code>](../ui/Loader.md/#Panoramax.components.ui.Loader) | The loader screen |
13
+ | api | [<code>API</code>](../../utils/API.md/#Panoramax.utils.API) | The API manager |
14
+ | map | [<code>Map</code>](../ui/Map.md/#Panoramax.components.ui.Map) | The MapLibre GL map itself |
15
+
16
+
17
+ * [.CoverageMap](#Panoramax.components.core.CoverageMap) ⇐ [<code>Basic</code>](Basic.md/#Panoramax.components.core.Basic)
18
+ * [new CoverageMap()](#new_Panoramax.components.core.CoverageMap_new)
19
+ * [.properties](#Panoramax.components.core.CoverageMap+properties) : <code>Object</code>
20
+ * [.onceReady()](Basic.md/#Panoramax.components.core.Basic+onceReady) ⇒ <code>Promise</code>
21
+ * [.onceAPIReady()](Basic.md/#Panoramax.components.core.Basic+onceAPIReady) ⇒ <code>Promise</code>
22
+ * [.getClassName()](Basic.md/#Panoramax.components.core.Basic+getClassName) ⇒ <code>string</code>
23
+ * [.select([seqId], [picId], [force])](#Panoramax.components.core.Basic+select)
24
+ * [.isWidthSmall()](Basic.md/#Panoramax.components.core.Basic+isWidthSmall) ⇒ <code>boolean</code>
25
+ * [.isHeightSmall()](Basic.md/#Panoramax.components.core.Basic+isHeightSmall) ⇒ <code>boolean</code>
26
+ * [.getSubComponentsNames()](Basic.md/#Panoramax.components.core.Basic+getSubComponentsNames) ⇒ <code>Array.&lt;string&gt;</code>
27
+ * [.addEventListener(type, listener, [options])](#Panoramax.components.core.Basic+addEventListener)
28
+ * ["menu-opened"](Basic.md/#Panoramax.components.core.Basic+event_menu-opened)
29
+ * ["select"](Basic.md/#Panoramax.components.core.Basic+event_select)
30
+ * ["ready"](Basic.md/#Panoramax.components.core.Basic+event_ready)
31
+ * ["broken"](Basic.md/#Panoramax.components.core.Basic+event_broken)
32
+
33
+ <a name="new_Panoramax.components.core.CoverageMap_new"></a>
34
+
35
+ ### new CoverageMap()
36
+ Coverage Map is a basic map showing Panoramax coverage.
37
+
38
+ Make sure to set width/height through CSS for proper display.
39
+
40
+ **Example**
41
+ ```html
42
+ <pnx-coverage-map
43
+ endpoint="https://panoramax.openstreetmap.fr/"
44
+ map='{"bounds": [[-73.9876, 40.7661], [-73.9397, 40.8002]]}'
45
+ style="width: 300px; height: 250px"
46
+ />
47
+ ```
48
+ <a name="Panoramax.components.core.CoverageMap+properties"></a>
49
+
50
+ ### coverageMap.properties : <code>Object</code>
51
+ Component properties.
52
+
53
+ **Kind**: instance property of [<code>CoverageMap</code>](#Panoramax.components.core.CoverageMap)
54
+ **Mixes**: [<code>properties</code>](Basic.md/#Panoramax.components.core.Basic+properties)
55
+ **Overrides**: [<code>properties</code>](Basic.md/#Panoramax.components.core.Basic+properties)
56
+ **Properties**
57
+
58
+ | Name | Type | Default | Description |
59
+ | --- | --- | --- | --- |
60
+ | endpoint | <code>string</code> | | URL to API to use (must be a [STAC API](https://github.com/radiantearth/stac-api-spec/blob/main/overview.md)) |
61
+ | [picture] | <code>string</code> | | The picture ID to display |
62
+ | [sequence] | <code>string</code> | | The sequence ID of the picture displayed |
63
+ | [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)) |
64
+ | [users] | <code>Array.&lt;string&gt;</code> | <code>[geovisio]</code> | List of users IDs to use for map display (defaults to general map, identified as "geovisio") |
65
+ | [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. |
66
+ | [lang] | <code>string</code> | | To override language used for labels. Defaults to using user's preferred languages. |
67
+ | [map] | <code>object</code> | | [Any map option available in Map class](../ui/Map.md/#Panoramax.components.ui.Map).<br />Example: `map='{"bounds": [[-73.9876, 40.7661], [-73.9397, 40.8002]]}'` |
68
+
69
+ <a name="Panoramax.components.core.Basic+onceReady"></a>
70
+
71
+ ### coverageMap.onceReady() ⇒ <code>Promise</code>
72
+ Waits for component to have its first loading done.
73
+
74
+ Each inheriting class must override this method.
75
+
76
+ **Kind**: instance method of [<code>CoverageMap</code>](#Panoramax.components.core.CoverageMap)
77
+ **Fulfil**: <code>null</code> When initialization is complete.
78
+ **Reject**: <code>string</code> Error message
79
+ <a name="Panoramax.components.core.Basic+onceAPIReady"></a>
80
+
81
+ ### coverageMap.onceAPIReady() ⇒ <code>Promise</code>
82
+ Waits for initial API setup.
83
+
84
+ **Kind**: instance method of [<code>CoverageMap</code>](#Panoramax.components.core.CoverageMap)
85
+ **Fulfil**: <code>null</code> When API is ready.
86
+ **Reject**: <code>string</code> Error message
87
+ <a name="Panoramax.components.core.Basic+getClassName"></a>
88
+
89
+ ### coverageMap.getClassName() ⇒ <code>string</code>
90
+ This allows to retrieve an always correct class name.
91
+ This is crap, but avoids issues with Webpack & so on.
92
+
93
+ Each inheriting class must override this method.
94
+
95
+ **Kind**: instance method of [<code>CoverageMap</code>](#Panoramax.components.core.CoverageMap)
96
+ **Returns**: <code>string</code> - The class name (for example "Basic")
97
+ <a name="Panoramax.components.core.Basic+select"></a>
98
+
99
+ ### coverageMap.select([seqId], [picId], [force])
100
+ Change the currently picture and/or sequence.
101
+ Calling the method without parameters unselects.
102
+
103
+ **Kind**: instance method of [<code>CoverageMap</code>](#Panoramax.components.core.CoverageMap)
104
+
105
+ | Param | Type | Default | Description |
106
+ | --- | --- | --- | --- |
107
+ | [seqId] | <code>string</code> | <code>null</code> | The sequence UUID |
108
+ | [picId] | <code>string</code> | <code>null</code> | The picture UUID |
109
+ | [force] | <code>boolean</code> | <code>false</code> | Force select even if already selected |
110
+
111
+ <a name="Panoramax.components.core.Basic+isWidthSmall"></a>
112
+
113
+ ### coverageMap.isWidthSmall() ⇒ <code>boolean</code>
114
+ Is the view running in a small container (small embed or smartphone)
115
+
116
+ **Kind**: instance method of [<code>CoverageMap</code>](#Panoramax.components.core.CoverageMap)
117
+ **Returns**: <code>boolean</code> - True if container is small
118
+ <a name="Panoramax.components.core.Basic+isHeightSmall"></a>
119
+
120
+ ### coverageMap.isHeightSmall() ⇒ <code>boolean</code>
121
+ Is the view running in a small-height container (small embed or smartphone)
122
+
123
+ **Kind**: instance method of [<code>CoverageMap</code>](#Panoramax.components.core.CoverageMap)
124
+ **Returns**: <code>boolean</code> - True if container height is small
125
+ <a name="Panoramax.components.core.Basic+getSubComponentsNames"></a>
126
+
127
+ ### coverageMap.getSubComponentsNames() ⇒ <code>Array.&lt;string&gt;</code>
128
+ List names of sub-components (like loader, api, map, psv) available in this component.
129
+
130
+ **Kind**: instance method of [<code>CoverageMap</code>](#Panoramax.components.core.CoverageMap)
131
+ **Returns**: <code>Array.&lt;string&gt;</code> - Sub-components names.
132
+ <a name="Panoramax.components.core.Basic+addEventListener"></a>
133
+
134
+ ### coverageMap.addEventListener(type, listener, [options])
135
+ Listen to events from this components or one of its sub-components.
136
+
137
+ For example, you can listen to `map` events using prefix `map:`.
138
+
139
+ ```js
140
+ me.addEventListener("map:move", doSomething);
141
+ ```
142
+
143
+ **Kind**: instance method of [<code>CoverageMap</code>](#Panoramax.components.core.CoverageMap)
144
+
145
+ | Param | Type | Description |
146
+ | --- | --- | --- |
147
+ | type | <code>string</code> | The event type to listen for |
148
+ | listener | <code>function</code> | The event handler |
149
+ | [options] | <code>object</code> | [Any original addEventListener available options](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#options) |
150
+
151
+ <a name="Panoramax.components.core.Basic+event_menu-opened"></a>
152
+
153
+ ### "menu-opened"
154
+ Event for overlaying menu opening
155
+
156
+ **Kind**: event emitted by [<code>CoverageMap</code>](#Panoramax.components.core.CoverageMap)
157
+ **Properties**
158
+
159
+ | Name | Type | Description |
160
+ | --- | --- | --- |
161
+ | detail.menu | <code>Element</code> | The opened menu |
162
+
163
+ <a name="Panoramax.components.core.Basic+event_select"></a>
164
+
165
+ ### "select"
166
+ Event for sequence/picture selection
167
+
168
+ **Kind**: event emitted by [<code>CoverageMap</code>](#Panoramax.components.core.CoverageMap)
169
+ **Properties**
170
+
171
+ | Name | Type | Description |
172
+ | --- | --- | --- |
173
+ | detail.seqId | <code>string</code> | The selected sequence ID |
174
+ | detail.picId | <code>string</code> | The selected picture ID (or null if not a precise picture clicked) |
175
+ | [detail.prevSeqId] | <code>string</code> | The previously selected sequence ID (or null if none) |
176
+ | [detail.prevPicId] | <code>string</code> | The previously selected picture ID (or null if none) |
177
+
178
+ <a name="Panoramax.components.core.Basic+event_ready"></a>
179
+
180
+ ### "ready"
181
+ Event when component is ready to use.
182
+ This happens when loader screen disappear, with picture and map loaded.
183
+
184
+ To follow more precisely loading steps, you can also watch for sub-components `ready` events.
185
+ ```js
186
+ // Watch API-readiness
187
+ viewer.addEventListener("api:ready", ...); // From parent
188
+ viewer.api.addEventListener("ready", ...); // Or on sub-component
189
+ ```
190
+
191
+ **Kind**: event emitted by [<code>CoverageMap</code>](#Panoramax.components.core.CoverageMap)
192
+ <a name="Panoramax.components.core.Basic+event_broken"></a>
193
+
194
+ ### "broken"
195
+ Event for viewer failing to initially load.
196
+
197
+ To follow more precisely loading failures, you can also watch for sub-components `broken` events.
198
+ ```js
199
+ // Watch API breaks
200
+ viewer.addEventListener("api:broken", ...); // From parent
201
+ viewer.api.addEventListener("broken", ...); // Or on sub-component
202
+ ```
203
+
204
+ **Kind**: event emitted by [<code>CoverageMap</code>](#Panoramax.components.core.CoverageMap)
205
+ **Properties**
206
+
207
+ | Name | Type | Description |
208
+ | --- | --- | --- |
209
+ | detail.error | <code>string</code> | The user-friendly error message to display |
210
+
@@ -0,0 +1,224 @@
1
+ <a name="Panoramax.components.core.Editor"></a>
2
+
3
+ ## Panoramax.components.core.Editor ⇐ [<code>Basic</code>](Basic.md/#Panoramax.components.core.Basic)
4
+ **Kind**: static class of <code>Panoramax.components.core</code>
5
+ **Extends**: [<code>Basic</code>](Basic.md/#Panoramax.components.core.Basic)
6
+ **Emits**: [<code>select</code>](Basic.md/#Panoramax.components.core.Basic+event_select), [<code>ready</code>](Basic.md/#Panoramax.components.core.Basic+event_ready), [<code>broken</code>](Basic.md/#Panoramax.components.core.Basic+event_broken)
7
+ **Element**: pnx-editor
8
+ **Properties**
9
+
10
+ | Name | Type | Description |
11
+ | --- | --- | --- |
12
+ | loader | [<code>Loader</code>](../ui/Loader.md/#Panoramax.components.ui.Loader) | The loader screen |
13
+ | api | [<code>API</code>](../../utils/API.md/#Panoramax.utils.API) | The API manager |
14
+ | map | [<code>Map</code>](../ui/Map.md/#Panoramax.components.ui.Map) | The MapLibre GL map itself |
15
+ | psv | [<code>Photo</code>](../ui/Photo.md/#Panoramax.components.ui.Photo) | The Photo Sphere Viewer component itself |
16
+
17
+
18
+ * [.Editor](#Panoramax.components.core.Editor) ⇐ [<code>Basic</code>](Basic.md/#Panoramax.components.core.Basic)
19
+ * [new Editor()](#new_Panoramax.components.core.Editor_new)
20
+ * [.properties](#Panoramax.components.core.Editor+properties) : <code>Object</code>
21
+ * [.previewSequenceHeadingChange([relHeading])](#Panoramax.components.core.Editor+previewSequenceHeadingChange)
22
+ * [.onceReady()](Basic.md/#Panoramax.components.core.Basic+onceReady) ⇒ <code>Promise</code>
23
+ * [.onceAPIReady()](Basic.md/#Panoramax.components.core.Basic+onceAPIReady) ⇒ <code>Promise</code>
24
+ * [.getClassName()](Basic.md/#Panoramax.components.core.Basic+getClassName) ⇒ <code>string</code>
25
+ * [.select([seqId], [picId], [force])](#Panoramax.components.core.Basic+select)
26
+ * [.isWidthSmall()](Basic.md/#Panoramax.components.core.Basic+isWidthSmall) ⇒ <code>boolean</code>
27
+ * [.isHeightSmall()](Basic.md/#Panoramax.components.core.Basic+isHeightSmall) ⇒ <code>boolean</code>
28
+ * [.getSubComponentsNames()](Basic.md/#Panoramax.components.core.Basic+getSubComponentsNames) ⇒ <code>Array.&lt;string&gt;</code>
29
+ * [.addEventListener(type, listener, [options])](#Panoramax.components.core.Basic+addEventListener)
30
+ * ["menu-opened"](Basic.md/#Panoramax.components.core.Basic+event_menu-opened)
31
+ * ["select"](Basic.md/#Panoramax.components.core.Basic+event_select)
32
+ * ["ready"](Basic.md/#Panoramax.components.core.Basic+event_ready)
33
+ * ["broken"](Basic.md/#Panoramax.components.core.Basic+event_broken)
34
+
35
+ <a name="new_Panoramax.components.core.Editor_new"></a>
36
+
37
+ ### new Editor()
38
+ Editor allows to focus on a single sequence, and preview what you edits would look like.
39
+ It shows both picture and map.
40
+
41
+ Make sure to set width/height through CSS for proper display.
42
+
43
+ **Example**
44
+ ```html
45
+ <pnx-editor
46
+ endpoint="https://panoramax.openstreetmap.fr/"
47
+ style="width: 300px; height: 250px"
48
+ />
49
+ ```
50
+ <a name="Panoramax.components.core.Editor+properties"></a>
51
+
52
+ ### editor.properties : <code>Object</code>
53
+ Component properties. All of [Basic properties](Basic.md/#Panoramax.components.core.Basic+properties) are available as well.
54
+
55
+ **Kind**: instance property of [<code>Editor</code>](#Panoramax.components.core.Editor)
56
+ **Mixes**: [<code>properties</code>](Basic.md/#Panoramax.components.core.Basic+properties)
57
+ **Overrides**: [<code>properties</code>](Basic.md/#Panoramax.components.core.Basic+properties)
58
+ **Properties**
59
+
60
+ | Name | Type | Default | Description |
61
+ | --- | --- | --- | --- |
62
+ | endpoint | <code>string</code> | | URL to API to use (must be a [STAC API](https://github.com/radiantearth/stac-api-spec/blob/main/overview.md)) |
63
+ | [picture] | <code>string</code> | | The picture ID to display |
64
+ | [sequence] | <code>string</code> | | The sequence ID of the picture displayed |
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
+ | [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. |
67
+ | [lang] | <code>string</code> | | To override language used for labels. Defaults to using user's preferred languages. |
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). |
69
+ | [background] | <code>string</code> | <code>&quot;streets&quot;</code> | Choose default map background to display (streets or aerial, if raster aerial background available). Defaults to street. |
70
+
71
+ <a name="Panoramax.components.core.Editor+previewSequenceHeadingChange"></a>
72
+
73
+ ### editor.previewSequenceHeadingChange([relHeading])
74
+ Preview on map how the new relative heading would reflect on all pictures.
75
+ This doesn't change anything on API-side, it's just a preview.
76
+
77
+ **Kind**: instance method of [<code>Editor</code>](#Panoramax.components.core.Editor)
78
+
79
+ | Param | Type | Description |
80
+ | --- | --- | --- |
81
+ | [relHeading] | <code>number</code> | The new relative heading compared to sequence path. In degrees, between -180 and 180 (0 = front, -90 = left, 90 = right). Set to null to remove preview. |
82
+
83
+ <a name="Panoramax.components.core.Basic+onceReady"></a>
84
+
85
+ ### editor.onceReady() ⇒ <code>Promise</code>
86
+ Waits for component to have its first loading done.
87
+
88
+ Each inheriting class must override this method.
89
+
90
+ **Kind**: instance method of [<code>Editor</code>](#Panoramax.components.core.Editor)
91
+ **Fulfil**: <code>null</code> When initialization is complete.
92
+ **Reject**: <code>string</code> Error message
93
+ <a name="Panoramax.components.core.Basic+onceAPIReady"></a>
94
+
95
+ ### editor.onceAPIReady() ⇒ <code>Promise</code>
96
+ Waits for initial API setup.
97
+
98
+ **Kind**: instance method of [<code>Editor</code>](#Panoramax.components.core.Editor)
99
+ **Fulfil**: <code>null</code> When API is ready.
100
+ **Reject**: <code>string</code> Error message
101
+ <a name="Panoramax.components.core.Basic+getClassName"></a>
102
+
103
+ ### editor.getClassName() ⇒ <code>string</code>
104
+ This allows to retrieve an always correct class name.
105
+ This is crap, but avoids issues with Webpack & so on.
106
+
107
+ Each inheriting class must override this method.
108
+
109
+ **Kind**: instance method of [<code>Editor</code>](#Panoramax.components.core.Editor)
110
+ **Returns**: <code>string</code> - The class name (for example "Basic")
111
+ <a name="Panoramax.components.core.Basic+select"></a>
112
+
113
+ ### editor.select([seqId], [picId], [force])
114
+ Change the currently picture and/or sequence.
115
+ Calling the method without parameters unselects.
116
+
117
+ **Kind**: instance method of [<code>Editor</code>](#Panoramax.components.core.Editor)
118
+
119
+ | Param | Type | Default | Description |
120
+ | --- | --- | --- | --- |
121
+ | [seqId] | <code>string</code> | <code>null</code> | The sequence UUID |
122
+ | [picId] | <code>string</code> | <code>null</code> | The picture UUID |
123
+ | [force] | <code>boolean</code> | <code>false</code> | Force select even if already selected |
124
+
125
+ <a name="Panoramax.components.core.Basic+isWidthSmall"></a>
126
+
127
+ ### editor.isWidthSmall() ⇒ <code>boolean</code>
128
+ Is the view running in a small container (small embed or smartphone)
129
+
130
+ **Kind**: instance method of [<code>Editor</code>](#Panoramax.components.core.Editor)
131
+ **Returns**: <code>boolean</code> - True if container is small
132
+ <a name="Panoramax.components.core.Basic+isHeightSmall"></a>
133
+
134
+ ### editor.isHeightSmall() ⇒ <code>boolean</code>
135
+ Is the view running in a small-height container (small embed or smartphone)
136
+
137
+ **Kind**: instance method of [<code>Editor</code>](#Panoramax.components.core.Editor)
138
+ **Returns**: <code>boolean</code> - True if container height is small
139
+ <a name="Panoramax.components.core.Basic+getSubComponentsNames"></a>
140
+
141
+ ### editor.getSubComponentsNames() ⇒ <code>Array.&lt;string&gt;</code>
142
+ List names of sub-components (like loader, api, map, psv) available in this component.
143
+
144
+ **Kind**: instance method of [<code>Editor</code>](#Panoramax.components.core.Editor)
145
+ **Returns**: <code>Array.&lt;string&gt;</code> - Sub-components names.
146
+ <a name="Panoramax.components.core.Basic+addEventListener"></a>
147
+
148
+ ### editor.addEventListener(type, listener, [options])
149
+ Listen to events from this components or one of its sub-components.
150
+
151
+ For example, you can listen to `map` events using prefix `map:`.
152
+
153
+ ```js
154
+ me.addEventListener("map:move", doSomething);
155
+ ```
156
+
157
+ **Kind**: instance method of [<code>Editor</code>](#Panoramax.components.core.Editor)
158
+
159
+ | Param | Type | Description |
160
+ | --- | --- | --- |
161
+ | type | <code>string</code> | The event type to listen for |
162
+ | listener | <code>function</code> | The event handler |
163
+ | [options] | <code>object</code> | [Any original addEventListener available options](https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener#options) |
164
+
165
+ <a name="Panoramax.components.core.Basic+event_menu-opened"></a>
166
+
167
+ ### "menu-opened"
168
+ Event for overlaying menu opening
169
+
170
+ **Kind**: event emitted by [<code>Editor</code>](#Panoramax.components.core.Editor)
171
+ **Properties**
172
+
173
+ | Name | Type | Description |
174
+ | --- | --- | --- |
175
+ | detail.menu | <code>Element</code> | The opened menu |
176
+
177
+ <a name="Panoramax.components.core.Basic+event_select"></a>
178
+
179
+ ### "select"
180
+ Event for sequence/picture selection
181
+
182
+ **Kind**: event emitted by [<code>Editor</code>](#Panoramax.components.core.Editor)
183
+ **Properties**
184
+
185
+ | Name | Type | Description |
186
+ | --- | --- | --- |
187
+ | detail.seqId | <code>string</code> | The selected sequence ID |
188
+ | detail.picId | <code>string</code> | The selected picture ID (or null if not a precise picture clicked) |
189
+ | [detail.prevSeqId] | <code>string</code> | The previously selected sequence ID (or null if none) |
190
+ | [detail.prevPicId] | <code>string</code> | The previously selected picture ID (or null if none) |
191
+
192
+ <a name="Panoramax.components.core.Basic+event_ready"></a>
193
+
194
+ ### "ready"
195
+ Event when component is ready to use.
196
+ This happens when loader screen disappear, with picture and map loaded.
197
+
198
+ To follow more precisely loading steps, you can also watch for sub-components `ready` events.
199
+ ```js
200
+ // Watch API-readiness
201
+ viewer.addEventListener("api:ready", ...); // From parent
202
+ viewer.api.addEventListener("ready", ...); // Or on sub-component
203
+ ```
204
+
205
+ **Kind**: event emitted by [<code>Editor</code>](#Panoramax.components.core.Editor)
206
+ <a name="Panoramax.components.core.Basic+event_broken"></a>
207
+
208
+ ### "broken"
209
+ Event for viewer failing to initially load.
210
+
211
+ To follow more precisely loading failures, you can also watch for sub-components `broken` events.
212
+ ```js
213
+ // Watch API breaks
214
+ viewer.addEventListener("api:broken", ...); // From parent
215
+ viewer.api.addEventListener("broken", ...); // Or on sub-component
216
+ ```
217
+
218
+ **Kind**: event emitted by [<code>Editor</code>](#Panoramax.components.core.Editor)
219
+ **Properties**
220
+
221
+ | Name | Type | Description |
222
+ | --- | --- | --- |
223
+ | detail.error | <code>string</code> | The user-friendly error message to display |
224
+