Tagged: annotations, css, target.id
- This topic has 5 replies, 3 voices, and was last updated 4 years, 4 months ago by
Branden Coker.
-
AuthorPosts
-
2021-08-17 at 3:57 pm #43699
Branden Coker
CustomerIn the past I’ve been able to show/hide scene objects by passing target.id as a group selector (as discussed here).
This time I’m trying to show/hide groups of annotations in the same way.
First I make a variable to hold a list of objects (nulls) in my scene.

Then I attach an annotation for to each null.

Next, I can show and hide them by setting display style to “block” or “none” by targeting the first variable I setup.

However, if I attempt to pass the target.id to this puzzle, it doesn’t work. I’ve tried to pass it directly or with the “list, GROUP” workaround. Neither has worked.


I could use a series of if/else statements to isolate which target the user is clicking, but it seems like there should be a way to pass the target.id directly to the puzzle without the extra bulk of a logic statement. Is there a way to do this?
2021-08-18 at 6:49 am #43715
Yuri KovelenovStaff2021-08-18 at 1:08 pm #43727Branden Coker
CustomerHi Yuri, yes I tried checking that as well. It still didn’t work.
2021-08-18 at 4:04 pm #43731
Alexander KovelenovStaffHi,
I reproduced your case and it looks like it works perfectly. Please use console.log to debug your code. Check out what happens in the “create annotation” blocks, when verify that you get proper values in event handler.
BTW why nulls? The lists you mention above should contain actual object names, not nulls.
Attachments:
2021-08-18 at 4:31 pm #43735Branden Coker
CustomerHello Alexander, sorry, I’m not sure where console.log resides. I have been monitoring the browser console during development. I don’t see any relevant messages there.
I just uploaded the project here:
As for the nulls, sorry for the confusion. The items contained in those collections are empties from Blender. I still have a habit of calling these nulls. They are indeed real objects though.
2021-08-18 at 5:23 pm #43736Branden Coker
CustomerAlexander, I was also able to create the functionality that you show above. I think the main difference is that in my real app, I’m attempting to use a target id in the parent document and affect the display of a div in the main (Verge) html doc.
-
AuthorPosts
- You must be logged in to reply to this topic.

