@panoramax/web-viewer 4.0.3-develop-28e2e30a → 4.0.3-develop-85c1e9c4
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
|
@@ -14,6 +14,7 @@ import PresetManager from "../../utils/PresetsManager";
|
|
|
14
14
|
|
|
15
15
|
export const PSV_ZOOM_DELTA = 20;
|
|
16
16
|
const PSV_MOVE_DELTA = Math.PI / 6;
|
|
17
|
+
export const KEYBOARD_SKIP_FOCUS_WIDGETS = ["pnx-mini", "pnx-widget-player", "pnx-widget-zoom"];
|
|
17
18
|
|
|
18
19
|
|
|
19
20
|
/**
|
|
@@ -333,13 +334,17 @@ export default class PhotoViewer extends Basic {
|
|
|
333
334
|
const keytopsv = () => this.psv.startKeyboardControl();
|
|
334
335
|
|
|
335
336
|
// Popup
|
|
336
|
-
this.popup.addEventListener("open",
|
|
337
|
-
this.popup.addEventListener("close",
|
|
337
|
+
this.popup.addEventListener("open", keytonone);
|
|
338
|
+
this.popup.addEventListener("close", keytopsv);
|
|
339
|
+
this.psv.addEventListener("click", keytopsv);
|
|
338
340
|
|
|
339
341
|
// Widgets
|
|
340
342
|
for(let cn of this.grid.childNodes) {
|
|
341
|
-
if(
|
|
342
|
-
cn.
|
|
343
|
+
if(
|
|
344
|
+
cn.getAttribute("slot") !== "bg"
|
|
345
|
+
&& !KEYBOARD_SKIP_FOCUS_WIDGETS.includes(cn.tagName.toLowerCase())
|
|
346
|
+
) {
|
|
347
|
+
cn.addEventListener("focusin", keytonone);
|
|
343
348
|
cn.addEventListener("focusout", () => {
|
|
344
349
|
if(this.popup.getAttribute("visible") === null) {
|
|
345
350
|
keytopsv();
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import "./Viewer.css";
|
|
4
4
|
import { linkMapAndPhoto, saveMapParamsToLocalStorage, getMapParamsFromLocalStorage } from "../../utils/map";
|
|
5
|
-
import PhotoViewer from "./PhotoViewer";
|
|
5
|
+
import PhotoViewer, {KEYBOARD_SKIP_FOCUS_WIDGETS} from "./PhotoViewer";
|
|
6
6
|
import Basic from "./Basic";
|
|
7
7
|
import MapMore from "../ui/MapMore";
|
|
8
8
|
import { initMapKeyboardHandler } from "../../utils/map";
|
|
@@ -371,7 +371,10 @@ export default class Viewer extends PhotoViewer {
|
|
|
371
371
|
|
|
372
372
|
// Widgets
|
|
373
373
|
for(let cn of this.grid.childNodes) {
|
|
374
|
-
if(
|
|
374
|
+
if(
|
|
375
|
+
cn.getAttribute("slot") !== "bg"
|
|
376
|
+
&& !KEYBOARD_SKIP_FOCUS_WIDGETS.includes(cn.tagName.toLowerCase())
|
|
377
|
+
) {
|
|
375
378
|
cn.addEventListener("focusin", () => keytonone());
|
|
376
379
|
cn.addEventListener("focusout", () => {
|
|
377
380
|
if(this.popup.getAttribute("visible") === null) {
|