I want to save the current view, i.e. atH, atV and fov, of a panorama into a session/cookie, after the user has interacted with the panorama. How can I achieve this?
Currently, I am using either the event "onviewchange" oder "onviewchanged", but tracing either one to the console shows me that it is fired constantly, as long as the panorama moves, which is impractical. I would like the panorama to stop, wait a second and only then save the aforementioned values. See this testing code sample.
<krpano>
...
<events onviewchanged= "save_view();"/>
<action name="save_view">
trace(view.hlookat); // for testing the event only
// Save atH, atV, fov
</action>
...
</krpano>
Maybe there is a way of combing onviewchanged with idle, but I cannot figure out, how this could work.
Any hint appreciated!
Cheers,
Hennzen
Edit: My dear... this post ended up in the wrong section, should've gone to krpano Panorama Viewer, not the HTML5 Viewer. My bad. Can any moderator move this?