-
-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toggleFullscreen #827
Comments
The keyboard control is designed only for fullscreen use. You force enable it with Photo-Sphere-Viewer/packages/core/src/services/EventsHandler.ts Lines 378 to 393 in 50e4aeb
And it is was the doc says https://photo-sphere-viewer.js.org/guide/config.html#advanced-options If you want a global keyboard listener, do it yourself window.addEventListener('keydown', (event) => {
console.log(event.key);
}, { passive: false }); |
I will add an option to choose if the keyboard is only enabled in fullscreen or always. |
well that will solve it. |
Photo-Sphere-Viewer/examples/equirectangular.html Lines 107 to 121 in 9b4d300
will have to wait for the next minor version because it can break some configs (though general retrocompatibility should work) |
This feature/bug fix has been released in version 5.1.0. |
Describe your problem
Hi Damien, Thank You for your great work.
I was playing with the new custom keyboard options...
and I defined a key (among the others) for toggling on/off the fullscreen mode
'f': (viewer) => viewer.toggleFullscreen(),
But it seems to work only one time. After toggling fullscreen mode on and then off ... all the other keys I defined (fullscreen included) stop working.
Am I doing something wrong or maybe there's an issue....
because if I manually hit the fullscreen button on the navbar (fullscreen ON) the other keys work again.
check the demo.
Online demo URL
https://www.tadini.it/photosphere/andolla/PS_andolla.html
Photo Sphere Viewer version
5.0.2
Plugins loaded
autorotate compass
Additional context
No response
The text was updated successfully, but these errors were encountered: