Dynamically created hotspots not seen after reloading the scene [SOLVED]

  • Hello Klaus, *,

    Not sure why, but I can not see my hotspots, when creating dynamically. I do see them just after starting the first scene. On the second scene or when reloading the first scene I do not see them.
    You can reproduce it on the attached tour.xml when replacing the ..\krpano-1.19-pr16-win\viewer\examples\demotour-corfu\tour.xml with the my tour.xml.

    The action buildcontrol() is triggered on the onnewscene event and checks for ismyhotspot="true" attribute. For that hotspot creates the button.
    Am I doing something wrong? (The lifespan of the control hotspots should be just for the particular scene but after recreation I don't see them).

    Thank you for your help.

    Pavel

  • Klaus, Piotr,

    With the keep="true" the buttons of the first scene (created dynamically) are on all scenes what I don't want to. The button on the second scene of the hotpost[hs3] is created but not seen.
    I tried parent="scene_name" or zorder2=1.0 with no success. Neither krpano html5 nor Flash is working as I assumed.
    Anytime, Piotr, thank you.

    Instead of using onnewscene event I put the hotspot[hs1].onloaded="buildcontrol(hs1);" for my hotspots. Sometimes I saw the buttons sometimes not. Clicking few times on the scene thumb reloading the same scene (2x - 11x) the button appeared. Strange.

    Klaus, please, is there some solution/workaround for this?

    Thank you,
    Pavel

    2 Mal editiert, zuletzt von pur (17. September 2018 um 23:24)

  • *,
    It's all about timing. During the creation the hotpspot.style where the visible=true, and after creating the myhotspot I set the myhotspot.visible=true again. In-spite of that the loadscene(newscene, MERGE) just reset the myhotspot.visible=false.
    I'm treating it with the callwhen( master_hotspost.loaded==true AND myhotpost.loaded == true, set(myhotpost,visible, true));
    Now everything works OK and it is not more a showstopper for my project!
    I wish you a great day!

    Pavel

Jetzt mitmachen!

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