Cards linked to gittree nodes created by user #493
-
Hello Trame wizards 🧙 , I currently have an app with a gittree, 3D window and geometry import/creation tools. As geometry is created, the gittree is populated, and a graphical selection of a 3D actor highlights the corresponding gittree node. Conversely, selecting the gittree node of a 3D actor highlights it in the 3D viewer. The active_ui name and actor name are identical and unique for each actor. Next step is to have a properties card of each actor also appear when it is selected, however, the created property cards persist after changing ui selection. A small example is below, any suggestions would be greatly appreciated.
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
The UI should be generated once at startup, and you should let the JS code decide which piece should be visible or templated on. In your example you never call |
Beta Was this translation helpful? Give feedback.
-
Another way to debug your setup for understanding why the current mesh card does not disapear is to do 2 things.
with SinglePageLayout(server) as layout:
....
print(layout) |
Beta Was this translation helpful? Give feedback.
-
Thanks for the pointer and your patience @jourdain , I managed to get things working! Not sure if it's the most elegant, but I just added
|
Beta Was this translation helpful? Give feedback.
The UI should be generated once at startup, and you should let the JS code decide which piece should be visible or templated on.
In your example you never call
box_card
orsphere_card
. Therefore they are not part of your UI.