onnewpano and onnewscene events not fired in 1.17

  • I mentioned earlier in my post on spheretoscreen not working on the iPhone that 1.17 broke my application, and I now know why. In 1.17, at least on my system with my scripts, neither the onnewpanorama and onnewscene events are getting fired at all. Also krpano is not reporting any errors. The lack of these events caused my html5 only application to break from 1.16.5, since I am listening for and depending on these events. I am seeing the onxmlcomplete event but that seems to be the only one that is getting fired in the load sequence.

    Environment: krpano 1.17, up-to-date Chrome, up-to-date OS X Mavericks.

    Unfortunately my environment is quite complex and is only running on localhost for now. I have attached two scripts, startup.xml, and SouthKaibab.trl_Trailhead.pan.xml which is representative xml for one of the hundreds of panoramas that the application can load. No panorama is loaded from startup.xml. The action loadNewNode in startup.xml is called from javascript when my app loads new panoramas. Again all of this worked perfectly on 1.16.5.

    Not Cheers,
    Larry Wieland

  • Hi,

    sorry, but I don't see any reason why these events shouldn't work...
    Have you tried adding trace calls inside the krpano actions to test if they are working?
    Are there any Javascript errors?
    Maybe there is some kind of timing problem where things were tried to be accessed which aren't there at that time...

    Best regards,
    Klaus

  • Hi Klaus,

    I am as puzzled by this as you. There are not Javascript errors. there are no krpano errors. I have tried both trace statements in the action scripts and callbacks to javascript to post simple messages in event handlers and get nothing except for the xmlcomplete event. All I can say with certainty at this point is that my app broke when I made the change in my html page to point to 1.17 instead of 1.16.5 and nothing more. I realize that without a page to look at you really have nothing to respond to. Unfortunately I'm currently on the road and won't get back to my development environment until Tuesday In the US, but when I do I'll resume testing and if necessary post a simple page with a URL you can access and we can discuss, so you probably will not see anything until Wednesday your time.

    Cheers,
    Larry Wieland

  • Well I've decided to sign off on this thread for now. With the spheretoscreen issue resolved I don't have any compelling need to move to 1.17 now and multiresolution now, but I expect I'll give it another shot in time. When I do and if I'm still having trouble I'll pick up this thread.

    Cheers,
    Larry Wieland

  • I'm sorry, I didn't receive the notification.
    krpano version is 1.17.pr2 (build 2014-01-10).

    Code
    <events onnewscene="js( grabnewscene() );"/>


    grabnewscene is a global variable function. It grabs other events (e,g, onviewchange) but onnewscene never is emitted.

  • Well, Klaus, we were both right. Your event behavior has changed with version 1.17. In earlier versions, the onnewpano and onnewscene events were fired when loadpano action was called to load an xml file that only contained <scene> elements. In version 1.17, in my testing, these events get fired only after a loadscene action is called.


    I have hundreds of panorama node locations in my application, and I have a separate xml file for each location, and each location xml file has one or more <scene> elements within it. When the user of my application moves to a new location, I call loadpano to load the xml file for that location, and I was waiting for the onnewpano event to be fired after calling loadpano to call loadscene to display the first scene at the location (but since it never came in 1.17 I never made the necessary loadscene call). For 1.17 I am now instead listening for the onxmlcomplete event following the loadpano before making the initial loadscene call.


    I had been listening for onnewpano instead of onxmlcomplete as a precaution against race conditions. It does seem to be working in 1.17 to use the onxmlcomplete event, but do I have any risk of race conditions in doing so, and if so which event should I be listening for to mark the completion of the loadpano processing before calling loadscene?


    I actually think that the new event structure is better, but some additional detailed documentation of exactly which events get fired in what order following which actions would be helpful.


    Cheers,
    Larry Wieland

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!