detect or stop panning?

Q&A about the latest versions
Post Reply
Posts: 18
Joined: Mon Apr 13, 2015 9:50 pm

Fri Apr 20, 2018 11:54 am

I have a pano2vr V5 pano running in a cordova/phonegap app. It works very well. Thank you!
However, there's one issue that I need to fix before submitting it to the app stores, which happens under Android and iOS.

I have a pano running in a div, and outside the div is a toolbar with home and back buttons. These buttons don't do pano navigation, they load other pages in a single-page site. All works nicely, except in a sort of edge case:

If I pan fast using touch on an android or iOS device, and very quickly touch a toolbar button while the pano is still panning, the whole device hangs. If I wait for the panning to stop, all is well. This is a rare, but catastrophic event!

So I need to detect a pan in progress, or somehow make sure I can make the button wait for the pan to complete.

The script behind the button can see the pano object, and I was hoping there might be an 'isPanning' property I could read, but I can't see it.
I've tried pano.stop(), but i get "pano.stop is not a function". (This is odd, as other pano methods work fine in the same context, eg pano.moveToDefaultView())

Sorry about the long-winded post! All I need is, in javascript, to detect an ongoing pan and either stop it or wait for it to complete. Any ideas?

Post Reply