@panoramax/web-viewer 4.3.1-develop-f2e27359 → 4.3.1-develop-61d5b28c

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@panoramax/web-viewer",
3
- "version": "4.3.1-develop-f2e27359",
3
+ "version": "4.3.1-develop-61d5b28c",
4
4
  "description": "Panoramax web viewer for geolocated pictures",
5
5
  "main": "build/index.js",
6
6
  "author": "Panoramax team",
@@ -37,7 +37,7 @@
37
37
  "https://data.geopf.fr/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=ORTHOIMAGERY.ORTHOPHOTOS&STYLE=normal&FORMAT=image/jpeg&TILEMATRIXSET=PM_0_19&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}"
38
38
  ],
39
39
  minzoom: 0,
40
- maxzoom: 21,
40
+ maxzoom: 19,
41
41
  attribution: "© IGN",
42
42
  tileSize: 256
43
43
  }'
@@ -23,3 +23,11 @@ pnx-editor pnx-map-background {
23
23
  left: 10px;
24
24
  font-family: var(--font-family);
25
25
  }
26
+
27
+ /* Player widget */
28
+ pnx-editor pnx-widget-player {
29
+ margin-top: 10px;
30
+ }
31
+ pnx-editor pnx-widget-player #pnx-player-play {
32
+ display: none;
33
+ }
@@ -160,6 +160,13 @@ export default class Editor extends Basic {
160
160
  try {
161
161
  this.psv = new Photo(this, this._psvContainer);
162
162
  this.psv._myVTour.datasource.nodeResolver = this._getNode.bind(this);
163
+ this.grid.appendChild(createWebComp("pnx-widget-player", {
164
+ slot: "top",
165
+ _parent: this,
166
+ class: "pnx-only-psv pnx-print-hidden",
167
+ size: "xl",
168
+ more: "never"
169
+ }));
163
170
  }
164
171
  catch(e) {
165
172
  let err = !PSSystem.isWebGLSupported ? this._t.pnx.error_webgl : this._t.pnx.error_psv;
@@ -422,6 +422,12 @@ export default class PhotoViewer extends Basic {
422
422
  }
423
423
  }
424
424
 
425
+ // Skip if popup is opened
426
+ if(this.popup.getAttribute("visible") !== null) {
427
+ this._disableKeyboard();
428
+ return;
429
+ }
430
+
425
431
  this._enableKeyboard();
426
432
  }
427
433
  else {
@@ -406,30 +406,6 @@ export default class Viewer extends PhotoViewer {
406
406
  this.map.keyboard.disable();
407
407
  }
408
408
 
409
- /** @private */
410
- _toggleKeyboardBasedOnFocus(e) {
411
- const target = e?.target || document.activeElement;
412
- if(this.contains(target)) {
413
- // Check if focus is not in a widget
414
- for(let cn of this.grid.childNodes) {
415
- if(
416
- cn.getAttribute("slot") !== "bg"
417
- && !KEYBOARD_SKIP_FOCUS_WIDGETS.includes(cn.tagName.toLowerCase())
418
- ) {
419
- if(cn.contains(target)) {
420
- this._disableKeyboard();
421
- return;
422
- }
423
- }
424
- }
425
-
426
- this._enableKeyboard();
427
- }
428
- else {
429
- this._disableKeyboard();
430
- }
431
- }
432
-
433
409
  /** @private */
434
410
  _handleKeyboardManagement() {
435
411
  // General