@panoramax/web-viewer 3.2.3-develop-e277ccb9 → 3.2.3-develop-dbce84df

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 (42) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/build/index.css +1 -1
  3. package/build/index.css.map +1 -1
  4. package/build/index.html +1 -1
  5. package/build/index.js +29 -25
  6. package/build/index.js.map +1 -1
  7. package/build/photo.html +1 -0
  8. package/config/paths.js +1 -0
  9. package/config/webpack.config.js +26 -0
  10. package/docs/03_URL_settings.md +4 -1
  11. package/docs/09_Develop.md +1 -1
  12. package/docs/images/class_diagram.drawio +37 -22
  13. package/docs/images/class_diagram.jpg +0 -0
  14. package/docs/index.md +15 -1
  15. package/docs/reference/components/core/PhotoViewer.md +256 -0
  16. package/docs/reference/components/core/Viewer.md +47 -49
  17. package/docs/reference/components/menus/MapLegend.md +1 -1
  18. package/docs/reference/components/ui/Photo.md +8 -0
  19. package/docs/reference/components/ui/widgets/Legend.md +7 -1
  20. package/docs/reference.md +3 -2
  21. package/docs/tutorials/custom_widgets.md +6 -11
  22. package/docs/tutorials/migrate_v4.md +2 -0
  23. package/mkdocs.yml +1 -0
  24. package/package.json +1 -1
  25. package/public/index.html +14 -9
  26. package/public/photo.html +55 -0
  27. package/src/components/core/PhotoViewer.css +65 -0
  28. package/src/components/core/PhotoViewer.js +441 -0
  29. package/src/components/core/Viewer.js +71 -306
  30. package/src/components/core/index.js +1 -0
  31. package/src/components/menus/MapLegend.js +1 -21
  32. package/src/components/ui/Photo.js +13 -3
  33. package/src/components/ui/widgets/Legend.js +32 -1
  34. package/src/index.js +1 -0
  35. package/src/translations/nl.json +105 -5
  36. package/src/utils/API.js +2 -2
  37. package/src/utils/InitParameters.js +29 -16
  38. package/src/utils/URLHandler.js +11 -5
  39. package/src/utils/map.js +2 -2
  40. package/tests/components/ui/Photo.test.js +6 -6
  41. package/tests/utils/InitParameters.test.js +1 -0
  42. package/tests/utils/URLHandler.test.js +16 -6
@@ -1,8 +1,8 @@
1
1
  <a name="Panoramax.components.core.Viewer"></a>
2
2
 
3
- ## Panoramax.components.core.Viewer ⇐ [<code>Basic</code>](Basic.md/#Panoramax.components.core.Basic)
3
+ ## Panoramax.components.core.Viewer ⇐ [<code>PhotoViewer</code>](PhotoViewer.md/#Panoramax.components.core.PhotoViewer)
4
4
  **Kind**: static class of <code>Panoramax.components.core</code>
5
- **Extends**: [<code>Basic</code>](Basic.md/#Panoramax.components.core.Basic)
5
+ **Extends**: [<code>PhotoViewer</code>](PhotoViewer.md/#Panoramax.components.core.PhotoViewer)
6
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), [<code>focus-changed</code>](#Panoramax.components.core.Viewer+event_focus-changed)
7
7
  **Element**: pnx-viewer
8
8
  **Slot**: `top-left` The top-left corner
@@ -17,28 +17,28 @@
17
17
  | --- | --- | --- |
18
18
  | loader | [<code>Loader</code>](../ui/Loader.md/#Panoramax.components.ui.Loader) | The loader screen |
19
19
  | api | [<code>API</code>](../../utils/API.md/#Panoramax.utils.API) | The API manager |
20
- | [map] | [<code>MapMore</code>](../ui/MapMore.md/#Panoramax.components.ui.MapMore) | The MapLibre GL map itself (if map is enabled) |
20
+ | map | [<code>MapMore</code>](../ui/MapMore.md/#Panoramax.components.ui.MapMore) | The MapLibre GL map itself |
21
21
  | psv | [<code>Photo</code>](../ui/Photo.md/#Panoramax.components.ui.Photo) | The Photo Sphere Viewer component itself |
22
22
  | grid | [<code>CorneredGrid</code>](../layout/CorneredGrid.md/#Panoramax.components.layout.CorneredGrid) | The grid layout manager |
23
- | [mini] | [<code>Mini</code>](../layout/Mini.md/#Panoramax.components.layout.Mini) | The reduced/collapsed map/photo component (if map is enabled) |
23
+ | mini | [<code>Mini</code>](../layout/Mini.md/#Panoramax.components.layout.Mini) | The reduced/collapsed map/photo component |
24
24
  | popup | [<code>Popup</code>](../ui/Popup.md/#Panoramax.components.ui.Popup) | The popup container |
25
25
  | urlHandler | [<code>URLHandler</code>](../../utils/URLHandler.md/#Panoramax.utils.URLHandler) | The URL query parameters manager |
26
26
 
27
27
 
28
- * [.Viewer](#Panoramax.components.core.Viewer) ⇐ [<code>Basic</code>](Basic.md/#Panoramax.components.core.Basic)
28
+ * [.Viewer](#Panoramax.components.core.Viewer) ⇐ [<code>PhotoViewer</code>](PhotoViewer.md/#Panoramax.components.core.PhotoViewer)
29
29
  * [new Viewer()](#new_Panoramax.components.core.Viewer_new)
30
30
  * [.properties](#Panoramax.components.core.Viewer+properties) : <code>Object</code>
31
31
  * [.onceReady()](#Panoramax.components.core.Viewer+onceReady) ⇒ <code>Promise</code>
32
- * [.oncePSVReady()](#Panoramax.components.core.Viewer+oncePSVReady) ⇒ <code>Promise</code>
33
32
  * [.onceMapReady()](#Panoramax.components.core.Viewer+onceMapReady) ⇒ <code>Promise</code>
34
- * [.onceFirstPicLoaded()](#Panoramax.components.core.Viewer+onceFirstPicLoaded) ⇒ <code>Promise</code>
35
- * [.setPopup(visible, [content])](#Panoramax.components.core.Viewer+setPopup)
36
33
  * [.moveCenter()](#Panoramax.components.core.Viewer+moveCenter)
37
- * [.moveLeft()](#Panoramax.components.core.Viewer+moveLeft)
38
- * [.moveRight()](#Panoramax.components.core.Viewer+moveRight)
39
- * [.moveUp()](#Panoramax.components.core.Viewer+moveUp)
40
- * [.moveDown()](#Panoramax.components.core.Viewer+moveDown)
41
34
  * [.isMapWide()](#Panoramax.components.core.Viewer+isMapWide) ⇒ <code>boolean</code>
35
+ * [.oncePSVReady()](PhotoViewer.md/#Panoramax.components.core.PhotoViewer+oncePSVReady) ⇒ <code>Promise</code>
36
+ * [.onceFirstPicLoaded()](PhotoViewer.md/#Panoramax.components.core.PhotoViewer+onceFirstPicLoaded) ⇒ <code>Promise</code>
37
+ * [.setPopup(visible, [content])](#Panoramax.components.core.PhotoViewer+setPopup)
38
+ * [.moveLeft()](PhotoViewer.md/#Panoramax.components.core.PhotoViewer+moveLeft)
39
+ * [.moveRight()](PhotoViewer.md/#Panoramax.components.core.PhotoViewer+moveRight)
40
+ * [.moveUp()](PhotoViewer.md/#Panoramax.components.core.PhotoViewer+moveUp)
41
+ * [.moveDown()](PhotoViewer.md/#Panoramax.components.core.PhotoViewer+moveDown)
42
42
  * [.onceAPIReady()](Basic.md/#Panoramax.components.core.Basic+onceAPIReady) ⇒ <code>Promise</code>
43
43
  * [.getClassName()](Basic.md/#Panoramax.components.core.Basic+getClassName) ⇒ <code>string</code>
44
44
  * [.select([seqId], [picId], [force])](#Panoramax.components.core.Basic+select)
@@ -57,6 +57,8 @@ Viewer is the main component of Panoramax JS library, showing pictures and map.
57
57
 
58
58
  This component has a [CorneredGrid](../layout/CorneredGrid.md/#Panoramax.components.layout.CorneredGrid) layout, you can use directly any slot element to pass custom widgets.
59
59
 
60
+ If you need a viewer without map, checkout [Photo Viewer component](PhotoViewer.md/#Panoramax.components.core.PhotoViewer).
61
+
60
62
  **Example**
61
63
  ```html
62
64
  <!-- Basic example -->
@@ -75,7 +77,6 @@ This component has a [CorneredGrid](../layout/CorneredGrid.md/#Panoramax.compone
75
77
  <pnx-viewer
76
78
  endpoint="https://panoramax.openstreetmap.fr/"
77
79
  widgets="false"
78
- map="false"
79
80
  >
80
81
  <p slot="top-right">My custom text</p>
81
82
  </pnx-viewer>
@@ -92,14 +93,14 @@ This component has a [CorneredGrid](../layout/CorneredGrid.md/#Panoramax.compone
92
93
  Component properties. All of [Basic properties](Basic.md/#Panoramax.components.core.Basic+properties) are available as well.
93
94
 
94
95
  **Kind**: instance property of [<code>Viewer</code>](#Panoramax.components.core.Viewer)
95
- **Mixes**: [<code>properties</code>](Basic.md/#Panoramax.components.core.Basic+properties)
96
- **Overrides**: [<code>properties</code>](Basic.md/#Panoramax.components.core.Basic+properties)
96
+ **Mixes**: [<code>properties</code>](PhotoViewer.md/#Panoramax.components.core.PhotoViewer+properties)
97
+ **Overrides**: [<code>properties</code>](PhotoViewer.md/#Panoramax.components.core.PhotoViewer+properties)
97
98
  **Properties**
98
99
 
99
100
  | Name | Type | Default | Description |
100
101
  | --- | --- | --- | --- |
101
102
  | 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)) |
102
- | [map] | <code>boolean</code> \| <code>object</code> | <code>true</code> | Should map be used (true/false), or an object with [any map option available in Map or MapMore class](../ui/MapMore.md/#Panoramax.components.ui.MapMore).<br />Example: `map="{'background': 'aerial', 'theme': 'age'}"` |
103
+ | [map] | <code>object</code> | | An object with [any map option available in Map or MapMore class](../ui/MapMore.md/#Panoramax.components.ui.MapMore).<br />Example: `map="{'background': 'aerial', 'theme': 'age'}"` |
103
104
  | [psv] | <code>object</code> | | [Any option to pass to Photo component](../ui/Photo.md/#Panoramax.components.ui.Photo) as an object.<br />Example: `psv="{'transitionDuration': 500, 'picturesNavigation': 'pic'}"` |
104
105
  | [url-parameters] | <code>string</code> | <code>true</code> | Should the component add and update URL query parameters to save viewer state ? |
105
106
  | [focus] | <code>string</code> | <code>&quot;pic&quot;</code> | The component showing up as main component (pic, map) |
@@ -118,15 +119,8 @@ Component properties. All of [Basic properties](Basic.md/#Panoramax.components.c
118
119
  Waits for Viewer to be completely ready (map & PSV loaded, first picture also if one is wanted)
119
120
 
120
121
  **Kind**: instance method of [<code>Viewer</code>](#Panoramax.components.core.Viewer)
121
- **Overrides**: [<code>onceReady</code>](Basic.md/#Panoramax.components.core.Basic+onceReady)
122
+ **Overrides**: [<code>onceReady</code>](PhotoViewer.md/#Panoramax.components.core.PhotoViewer+onceReady)
122
123
  **Returns**: <code>Promise</code> - When viewer is ready
123
- <a name="Panoramax.components.core.Viewer+oncePSVReady"></a>
124
-
125
- ### viewer.oncePSVReady() ⇒ <code>Promise</code>
126
- Waiting for Photo Sphere Viewer to be available.
127
-
128
- **Kind**: instance method of [<code>Viewer</code>](#Panoramax.components.core.Viewer)
129
- **Returns**: <code>Promise</code> - When PSV is ready to use
130
124
  <a name="Panoramax.components.core.Viewer+onceMapReady"></a>
131
125
 
132
126
  ### viewer.onceMapReady() ⇒ <code>Promise</code>
@@ -134,14 +128,37 @@ Waiting for map to be available.
134
128
 
135
129
  **Kind**: instance method of [<code>Viewer</code>](#Panoramax.components.core.Viewer)
136
130
  **Returns**: <code>Promise</code> - When map is ready to use
137
- <a name="Panoramax.components.core.Viewer+onceFirstPicLoaded"></a>
131
+ <a name="Panoramax.components.core.Viewer+moveCenter"></a>
132
+
133
+ ### viewer.moveCenter()
134
+ Move the view of main component to its center.
135
+ For map, center view on selected picture.
136
+ For picture, center view on image center.
137
+
138
+ **Kind**: instance method of [<code>Viewer</code>](#Panoramax.components.core.Viewer)
139
+ **Overrides**: [<code>moveCenter</code>](PhotoViewer.md/#Panoramax.components.core.PhotoViewer+moveCenter)
140
+ <a name="Panoramax.components.core.Viewer+isMapWide"></a>
141
+
142
+ ### viewer.isMapWide() ⇒ <code>boolean</code>
143
+ Is the map shown as main element instead of viewer (wide map mode) ?
144
+
145
+ **Kind**: instance method of [<code>Viewer</code>](#Panoramax.components.core.Viewer)
146
+ **Returns**: <code>boolean</code> - True if map is wider than viewer
147
+ <a name="Panoramax.components.core.PhotoViewer+oncePSVReady"></a>
148
+
149
+ ### viewer.oncePSVReady() ⇒ <code>Promise</code>
150
+ Waiting for Photo Sphere Viewer to be available.
151
+
152
+ **Kind**: instance method of [<code>Viewer</code>](#Panoramax.components.core.Viewer)
153
+ **Returns**: <code>Promise</code> - When PSV is ready to use
154
+ <a name="Panoramax.components.core.PhotoViewer+onceFirstPicLoaded"></a>
138
155
 
139
156
  ### viewer.onceFirstPicLoaded() ⇒ <code>Promise</code>
140
157
  Waits for first picture to display on PSV.
141
158
 
142
159
  **Kind**: instance method of [<code>Viewer</code>](#Panoramax.components.core.Viewer)
143
160
  **Fulfil**: <code>undefined</code> When picture is shown
144
- <a name="Panoramax.components.core.Viewer+setPopup"></a>
161
+ <a name="Panoramax.components.core.PhotoViewer+setPopup"></a>
145
162
 
146
163
  ### viewer.setPopup(visible, [content])
147
164
  Change full-page popup visibility and content
@@ -153,49 +170,30 @@ Change full-page popup visibility and content
153
170
  | visible | <code>boolean</code> | | True to make it appear |
154
171
  | [content] | <code>string</code> \| <code>Array.&lt;Element&gt;</code> | <code>null</code> | The new popup content |
155
172
 
156
- <a name="Panoramax.components.core.Viewer+moveCenter"></a>
157
-
158
- ### viewer.moveCenter()
159
- Move the view of main component to its center.
160
- For map, center view on selected picture.
161
- For picture, center view on image center.
162
-
163
- **Kind**: instance method of [<code>Viewer</code>](#Panoramax.components.core.Viewer)
164
- <a name="Panoramax.components.core.Viewer+moveLeft"></a>
173
+ <a name="Panoramax.components.core.PhotoViewer+moveLeft"></a>
165
174
 
166
175
  ### viewer.moveLeft()
167
176
  Moves the view of main component slightly to the left.
168
177
 
169
178
  **Kind**: instance method of [<code>Viewer</code>](#Panoramax.components.core.Viewer)
170
- <a name="Panoramax.components.core.Viewer+moveRight"></a>
179
+ <a name="Panoramax.components.core.PhotoViewer+moveRight"></a>
171
180
 
172
181
  ### viewer.moveRight()
173
182
  Moves the view of main component slightly to the right.
174
183
 
175
184
  **Kind**: instance method of [<code>Viewer</code>](#Panoramax.components.core.Viewer)
176
- <a name="Panoramax.components.core.Viewer+moveUp"></a>
185
+ <a name="Panoramax.components.core.PhotoViewer+moveUp"></a>
177
186
 
178
187
  ### viewer.moveUp()
179
188
  Moves the view of main component slightly to the top.
180
189
 
181
190
  **Kind**: instance method of [<code>Viewer</code>](#Panoramax.components.core.Viewer)
182
- <a name="Panoramax.components.core.Viewer+moveDown"></a>
191
+ <a name="Panoramax.components.core.PhotoViewer+moveDown"></a>
183
192
 
184
193
  ### viewer.moveDown()
185
194
  Moves the view of main component slightly to the bottom.
186
195
 
187
196
  **Kind**: instance method of [<code>Viewer</code>](#Panoramax.components.core.Viewer)
188
- <a name="Panoramax.components.core.Viewer+isMapWide"></a>
189
-
190
- ### viewer.isMapWide() ⇒ <code>boolean</code>
191
- Is the map shown as main element instead of viewer (wide map mode) ?
192
-
193
- **Kind**: instance method of [<code>Viewer</code>](#Panoramax.components.core.Viewer)
194
- **Returns**: <code>boolean</code> - True if map is wider than viewer
195
- **Throws**:
196
-
197
- - <code>Error</code> If map is not enabled
198
-
199
197
  <a name="Panoramax.components.core.Basic+onceAPIReady"></a>
200
198
 
201
199
  ### viewer.onceAPIReady() ⇒ <code>Promise</code>
@@ -7,7 +7,7 @@
7
7
  <a name="new_Panoramax.components.menus.MapLegend_new"></a>
8
8
 
9
9
  ### new MapLegend()
10
- Map legend displays information about map sources and Panoramax.
10
+ Map legend displays information about map sources.
11
11
 
12
12
  **Example**
13
13
  ```html
@@ -8,6 +8,7 @@
8
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
9
  * [new Photo(parent, container, [options])](#new_Panoramax.components.ui.Photo_new)
10
10
  * [.getPictureMetadata()](#Panoramax.components.ui.Photo+getPictureMetadata) ⇒ <code>object</code>
11
+ * [.getPictureId()](#Panoramax.components.ui.Photo+getPictureId) ⇒ <code>string</code> \| <code>null</code>
11
12
  * [.goToNextPicture()](#Panoramax.components.ui.Photo+goToNextPicture)
12
13
  * [.goToPrevPicture()](#Panoramax.components.ui.Photo+goToPrevPicture)
13
14
  * [.goToPosition(lat, lon)](#Panoramax.components.ui.Photo+goToPosition) ⇒ <code>Promise</code>
@@ -69,6 +70,13 @@ Access currently shown picture metadata
69
70
 
70
71
  **Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
71
72
  **Returns**: <code>object</code> - Picture metadata
73
+ <a name="Panoramax.components.ui.Photo+getPictureId"></a>
74
+
75
+ ### photo.getPictureId() ⇒ <code>string</code> \| <code>null</code>
76
+ Get current picture ID, or loading picture ID if any.
77
+
78
+ **Kind**: instance method of [<code>Photo</code>](#Panoramax.components.ui.Photo)
79
+ **Returns**: <code>string</code> \| <code>null</code> - Picture ID (current or loading), or null if none is selected.
72
80
  <a name="Panoramax.components.ui.Photo+goToNextPicture"></a>
73
81
 
74
82
  ### photo.goToNextPicture()
@@ -13,10 +13,15 @@
13
13
 
14
14
  ### new Legend()
15
15
  Legend widget, handling switch between map and photo components.
16
+ Also displays a default "About Panoramax" message.
16
17
 
17
18
  **Example**
18
19
  ```html
19
- <pnx-widget-legend _parent=${viewer} />
20
+ <pnx-widget-legend
21
+ _parent=${viewer}
22
+ focus="map"
23
+ picture="PICTURE-ID-IF-ANY"
24
+ />
20
25
  ```
21
26
  <a name="Panoramax.components.ui.widgets.Legend+properties"></a>
22
27
 
@@ -29,4 +34,5 @@ Component properties.
29
34
  | Name | Type | Description |
30
35
  | --- | --- | --- |
31
36
  | [focus] | <code>string</code> | The focused main component (map, pic) |
37
+ | [picture] | <code>string</code> | The picture ID |
32
38
 
package/docs/reference.md CHANGED
@@ -8,8 +8,9 @@ Main web components:
8
8
 
9
9
  - [Basic](./reference/components/core/Basic.md) : base class for other components, embedding shared logic.
10
10
  - [CoverageMap](./reference/components/core/CoverageMap.md) : map showing Panoramax data availability.
11
- - [Editor](./reference/components/core/Editor.md) : photo and map display for editing purposes.
12
- - [Viewer](./reference/components/core/Viewer.md) : the classic photo and map viewer.
11
+ - [Editor](./reference/components/core/Editor.md) : photo and map display for editing purposes.7
12
+ - [PhotoViewer](./reference/components/core/PhotoViewer.md) : the classic photo-only viewer.
13
+ - [Viewer](./reference/components/core/Viewer.md) : the photo and map viewer.
13
14
 
14
15
  ## `components.layout`
15
16
 
@@ -6,7 +6,7 @@ We use internally [slots](https://developer.mozilla.org/docs/Web/HTML/Element/sl
6
6
 
7
7
  !!! note
8
8
 
9
- This is only available for __Viewer__ component, not for _Coverage Map_ or _Editor_.
9
+ This is only available for __Viewer__ & __Photo Viewer__ components, not for _Coverage Map_ or _Editor_.
10
10
 
11
11
 
12
12
  ## Add a new widget
@@ -36,17 +36,12 @@ For finer control, you may want to get rid of all existing widgets before adding
36
36
  </pnx-viewer>
37
37
  ```
38
38
 
39
- Note that this keeps only the _Mini_ map/picture display (in bottom-left corner), if you want to get rid of it as well, you can with `map="false"` attribute:
39
+ Note that this keeps only the _Mini_ map/picture display (in bottom-left corner).
40
+
41
+ !!! note
42
+
43
+ If you don't need map at all, you can also use the [Photo Viewer](../reference/components/core/PhotoViewer.md) component, which is a picture display without any map.
40
44
 
41
- ```html
42
- <pnx-viewer
43
- endpoint="https://panoramax.openstreetmap.fr/"
44
- widgets="false"
45
- map="false"
46
- >
47
- <p slot="top-right">My custom text</p>
48
- </pnx-viewer>
49
- ```
50
45
 
51
46
  ## Reuse default widgets
52
47
 
@@ -66,6 +66,8 @@ Many stuff was moved around, and have a bit different naming. Main classes shoul
66
66
  | `Panoramax.Editor` | `<pnx-editor>` |
67
67
  | `Panoramax.StandaloneMap` | `<pnx-coverage-map>` |
68
68
 
69
+ A new main component is available, named __Photo Viewer__ (`<pnx-photo-viewer>`) for showing up only picture (without map).
70
+
69
71
  And source code is splitted in more packages:
70
72
 
71
73
  * `Panoramax.components` : everything you can see graphically
package/mkdocs.yml CHANGED
@@ -57,6 +57,7 @@ nav:
57
57
  - Basic: 'reference/components/core/Basic.md'
58
58
  - CoverageMap: 'reference/components/core/CoverageMap.md'
59
59
  - Editor: 'reference/components/core/Editor.md'
60
+ - PhotoViewer: 'reference/components/core/PhotoViewer.md'
60
61
  - Viewer: 'reference/components/core/Viewer.md'
61
62
  - layout:
62
63
  - CorneredGrid: 'reference/components/layout/CorneredGrid.md'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoramax/web-viewer",
3
- "version": "3.2.3-develop-e277ccb9",
3
+ "version": "3.2.3-develop-dbce84df",
4
4
  "description": "Panoramax web viewer for geolocated pictures",
5
5
  "main": "build/index.js",
6
6
  "author": "Panoramax team",
package/public/index.html CHANGED
@@ -18,9 +18,8 @@
18
18
  }
19
19
  .oneView {
20
20
  text-align: center;
21
- flex-grow: 1;
22
- flex-shrink: 1;
23
- min-width: 30%;
21
+ flex: 1;
22
+ min-width: 400px;
24
23
  }
25
24
  iframe {
26
25
  width: 100%;
@@ -38,20 +37,26 @@
38
37
 
39
38
  <div class="allViews">
40
39
  <div class="oneView">
41
- <h2 id="viewer">Viewer</h2>
42
- <p>General-purpose map and picture display.<br /><a href="./viewer.html">Full page</a> | <a href="https://gitlab.com/panoramax/clients/web-viewer/-/blob/develop/docs/02_Usage.md#viewer">Docs</a></p>
40
+ <h2>Viewer</h2>
41
+ <p>General-purpose map and picture display.<br /><a href="./viewer.html">Full page</a> | <a href="https://viewer.geovisio.fr/docs/reference/components/core/Viewer/">Docs</a></p>
43
42
  <iframe src="./viewer.html?server=meta"></iframe>
44
43
  </div>
45
44
 
46
45
  <div class="oneView">
47
- <h2 id="map">Coverage Map</h2>
48
- <p>A map-only view, to locate sequences and pictures.<br /><a href="./map.html">Full page</a> | <a href="https://gitlab.com/panoramax/clients/web-viewer/-/blob/develop/docs/02_Usage.md#CoverageMap">Docs</a></p>
46
+ <h2>Photo Viewer</h2>
47
+ <p>Picture-only display.<br /><a href="./photo.html">Full page</a> | <a href="https://viewer.geovisio.fr/docs/reference/components/core/PhotoViewer/">Docs</a></p>
48
+ <iframe src="./photo.html?server=meta"></iframe>
49
+ </div>
50
+
51
+ <div class="oneView">
52
+ <h2>Coverage Map</h2>
53
+ <p>A map-only view, to locate sequences and pictures.<br /><a href="./map.html">Full page</a> | <a href="https://viewer.geovisio.fr/docs/reference/components/core/CoverageMap/">Docs</a></p>
49
54
  <iframe src="./map.html"></iframe>
50
55
  </div>
51
56
 
52
57
  <div class="oneView">
53
- <h2 id="editor">Editor</h2>
54
- <p>A map and picture view, focused around metadata editing.<br /><a href="./editor.html">Full page</a> | <a href="https://gitlab.com/panoramax/clients/web-viewer/-/blob/develop/docs/02_Usage.md#editor">Docs</a></p>
58
+ <h2>Editor</h2>
59
+ <p>A map and picture view, focused around metadata editing.<br /><a href="./editor.html">Full page</a> | <a href="https://viewer.geovisio.fr/docs/reference/components/core/Editor/">Docs</a></p>
55
60
  <iframe src="./editor.html"></iframe>
56
61
  </div>
57
62
  </div>
@@ -0,0 +1,55 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
6
+ <title>Panoramax Photo Viewer</title>
7
+ <style>
8
+ #viewer {
9
+ position: relative;
10
+ width: 95%;
11
+ margin: 2.5%;
12
+ height: 400px;
13
+ }
14
+ #viewer.fullpage {
15
+ position: fixed;
16
+ top: 0;
17
+ bottom: 0;
18
+ left: 0;
19
+ right: 0;
20
+ height: unset;
21
+ width: unset;
22
+ margin: 0;
23
+ }
24
+ </style>
25
+ </head>
26
+ <body>
27
+ <noscript>
28
+ You need to enable JavaScript to run this app.
29
+ </noscript>
30
+
31
+ <pnx-photo-viewer
32
+ id="viewer"
33
+ class="fullpage"
34
+ sequence="ecfe4b2c-0acd-4d3a-a10d-c3e6818755c8"
35
+ picture="329af5c6-4761-4a6d-9c1e-674fd6daa8b6"
36
+ />
37
+
38
+ <script>
39
+ var servers = {
40
+ meta: "https://api.panoramax.xyz/api",
41
+ ign: "https://panoramax.ign.fr/api",
42
+ osm: "https://panoramax.openstreetmap.fr/api",
43
+ local: "http://localhost:5000/api",
44
+ dev: "https://panoramax.codeureusesenliberte.fr/api",
45
+ };
46
+ var urlParams = new URLSearchParams(window.location.search);
47
+ var server = servers[urlParams.get("server") || "meta"];
48
+
49
+ window.onload = () => {
50
+ var viewer = document.getElementById("viewer");
51
+ viewer.setAttribute("endpoint", server);
52
+ };
53
+ </script>
54
+ </body>
55
+ </html>
@@ -0,0 +1,65 @@
1
+ /* Maximized components */
2
+ pnx-photo-viewer .pnx-psv {
3
+ position: absolute;
4
+ inset: 0;
5
+ z-index: 0;
6
+ }
7
+
8
+ /* No PSV loader */
9
+ pnx-photo-viewer .psv-loader {
10
+ display: none;
11
+ }
12
+
13
+ /* Cornered grid layout */
14
+ pnx-photo-viewer pnx-cornered-grid::part(corner-top-left),
15
+ pnx-photo-viewer pnx-cornered-grid::part(corner-top),
16
+ pnx-photo-viewer pnx-cornered-grid::part(corner-top-right),
17
+ pnx-photo-viewer pnx-cornered-grid::part(corner-bottom-left),
18
+ pnx-photo-viewer pnx-cornered-grid::part(corner-bottom),
19
+ pnx-photo-viewer pnx-cornered-grid::part(corner-bottom-right) {
20
+ gap: 10px;
21
+ padding: 10px;
22
+ }
23
+
24
+ @media screen and (max-width: 576px) {
25
+ pnx-photo-viewer pnx-cornered-grid::part(corner-top-right) {
26
+ flex-direction: column;
27
+ align-items: flex-end;
28
+ justify-content: flex-start;
29
+ }
30
+ }
31
+
32
+ /* Override legend positioning */
33
+ @media screen and (max-width: 576px) {
34
+ pnx-photo-viewer pnx-widget-legend {
35
+ position: fixed;
36
+ top: 0;
37
+ left: 0;
38
+ right: 0;
39
+ }
40
+
41
+ pnx-photo-viewer pnx-widget-legend::part(panel) {
42
+ border-radius: 0;
43
+ border-top: none;
44
+ border-left: none;
45
+ border-right: none;
46
+ width: unset;
47
+ max-width: unset;
48
+ }
49
+
50
+ pnx-photo-viewer pnx-widget-player {
51
+ margin-top: 60px;
52
+ }
53
+ }
54
+
55
+ @media screen and (min-width: 576px) {
56
+ pnx-photo-viewer pnx-widget-legend {
57
+ position: absolute;
58
+ left: 10px;
59
+ top: 60px;
60
+ }
61
+
62
+ pnx-photo-viewer pnx-widget-legend {
63
+ top: 10px;
64
+ }
65
+ }