You are not logged in.

1

Monday, February 9th 2015, 9:03pm

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

Saturday, February 14th 2015, 11:24am

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):

Source code

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

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

siamak

Beginner

Posts: 23

Location: Berlin

Occupation: Softwareentwickler

  • Send private message

3

Wednesday, May 27th 2015, 10:04am

Hi guys,

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

Source code

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