Embedded pano is disappearing when route changes

  • Hello everyone,

    I am using AngularJS and changing routes often, and embedded krpano div is becomes empty after route changes.
    If I refresh page, it is perfect, but if I go back and come the page again, the viewer is lost.
    If anybody has an experience to use krpano with Angulat ui-route, kindly give some opinions.

    Thank you in advance.

    Mudin

  • Hi Mudin,

    Have you tried destroying the pano object when leaving the state which displays the viewer ?
    We have successfully implemented an Angular JS app that displays different pano viewers and we fixed the behavior you describe by calling removepano from the krpano js library. Just make sure that removepano is called when the user leaves the state, for example in a scope destruction event.

    Hope this helps,
    Cheers

  • Hi Mudin,

    Have you tried destroying the pano object when leaving the state which displays the viewer ?
    We have successfully implemented an Angular JS app that displays different pano viewers and we fixed the behavior you describe by calling removepano from the krpano js library. Just make sure that removepano is called when the user leaves the state, for example in a scope destruction event.

    Hope this helps,
    Cheers

    Hello Dreummeur,
    Thank you for your suggestions.
    I have not tried to remove the pano.
    Cuz I guess it is already removed as html template is changed.

    I call embedpano function with some timeout in the controller.
    The controller runs everytime the route state comes to this controller.
    Still not sure it is good solution or not.

    Best regards,
    Mudin

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!