We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

second time annotation id don’t work

Home Forums Puzzles second time annotation id don’t work

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #24791
    techdev
    Participant

    Please check attached image – it’s divided into 3 parts

    1) Add annotation

    I have added annotation “1” on an object 1 which displays “test” on clicking. I have given poi_1 as id to make the event work.

    2) On event click
    Here I have a click event fo id poi_1 (set above) which call tween camera action

    3) On event click (to on/off annotation display)
    Here I have logic for displaying annotation through a button in main UI

    Now the issue is when I load the page, first-time camera tween works perfectly but once I use the button in UI to off annotation, and then again use it to On annotation display and then try to click on annotation(running 2 again) camera tween does not work.

    #24793

    Hi,

    After you removed and re-added the annotation, you need to assign the click event listener to it as well, since it is a new element which is unaware of previous assignments.

    Chief 3D Verger | LinkedIn | Twitter

    #24794
    techdev
    Participant

    Thanks for quick response,sorry I not understand,can you explain more.
    Thanks in advance

    #24801
    techdev
    Participant

    Hi,

    ok, It’s working now, Thanks :yahoo:

    #24803

    glad you worked it out! :good:

    Chief 3D Verger | LinkedIn | Twitter

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.