Sie sind nicht angemeldet.

1

Montag, 9. Februar 2015, 21:03

why does pano require an initial click to get started?

I am new here and just starting to learn about using krpano. It looks great!

I took one of the example panos and started editing it to get a feel for the product. I turned off the mouse by setting usercontrol to "keyb".
I found that the pano requires a single mouse click (at least one) to allow me to use the keyboard arrows to move the pano.

I used the onready statement to trigger an initial .focus() and/or a .click on the pano but they didn't work.

Why does it require this initial click? Once I have made a single click then I can use focus() in the reset button and elsewhere to get the pano to accept other arrow keys for movement.

My pano is here: http://demo.xplotiv.com/krpano/pano.html

Thanks!
-Kim

2

Samstag, 14. Februar 2015, 11:24

Hi,

in Flash this is given by the Flashplayer, but in HTML5 the krpano viewer itself is wait for getting a mouse or touch down before taking the keyboard control.

Here a way/hack to give krpano manually the keyboard focus on startup (for HTML5):

Quellcode

1
2
3
4
5
6
embedpano({..., id:"krpanoSWFObject", onready:krpano_onready});

function krpano_onready()
{
  window.activekrpanowindow = "krpanoSWFObject";
}

siamak

Anfänger

Beiträge: 23

Wohnort: Berlin

Beruf: Softwareentwickler

  • Nachricht senden

3

Mittwoch, 27. Mai 2015, 10:04

Hi guys,

thank you Klaus. That saved my day. However, I need another "focus" call to make it work:

Quellcode

1
2
3
4
5
6
7
embedpano({..., id:"krpanoSWFObject", onready:krpano_onready});

function krpano_onready()
{
  window.activekrpanowindow = "krpanoSWFObject";
  document.getElementById("krpanoSWFObject").focus();
}


Cheers

Siamak