-
Notifications
You must be signed in to change notification settings - Fork 28
getting control of elements wihtin "templates" / symbols #89
Comments
Hi. You should be able to use |
Hi @Steve-Mcl thanks for answering so fast .... Unfortunately thats exactly what I've described in my post.... given is a SVG-file with the following Now I'm able to use (visualize) the symbol e.g.: When adding an Event on the SVG-node I'm able to use: Also availible are #Plug1 and #Plug2, but nothing like: #Plug1.MyLED, #Plug1.Description1 or #Plug2.MyLED The aim is to change the style (especially the color) of the LED and some Text (for actual values) in the Description1/2 .... Best regards |
Ah ok, well... There is no simple way to do what you want. The inherent nature of defs and use elements dictates that sub-elements within an original defs element cannot be manipulated individually in use elements derived from it. To do so would require that each use element have a separate copy of each sub-element. That would defeat one of the purposes of the defs/use partnership, i.e. to save memory. However, while you cannot change the attributes of one specific sub-element in a use element, you can change the attributes of all of the sub-elements in a use element at one time (not entirely desirable) There are 2 solutions...
|
That's exactley the answer I didn't want to hear :-D Well, I think there's nothing much to add .... Just another small question, although it is not directly dealing with the current topic: Now is the question how to code this behaviuor ... What is your tip? Regards |
Hi Joe, Had no time to try your example yet, but can't you use CSS variables inside your symbol? And then every time you use the symbol, you pass other other color values. Here you can find an example and some explanation. About the slider: you want a popup window? Or a slider popping up somewhere else in your dashboard? |
Hi @bartbutenaers, thanks for answering. I will have a closer look to the given example later on. I saw a similar video on youtube about the dashboard-slider controlling a roboter-like gripper. If I am using the native dashboard I have to chage the tabs every time I like to set the value. It would be more comfortable to get an popup "near" the widget. Best regards Actually thas what I've figured out my GUI elements so far (only internal SVG-animations) that the user gets feedback: |
Hi there,
first of all I'm very impressed by this great work. I've been searching around for a SCADA-like GUI and finally find your node.... Exactly what I've been searching for!
The situation: I like to use templates for some elements like "roller blinds" or "power plugs". Both include a rectangular background, some texts and of course some "pickable" symbols. In the case of an power plug it is "only" one circle (LED) in case of a roller blind there are two arrows (one for up, one for down).
When inserting those groups as plain text for each element the LED (for a power plug) is getting an unique id (for each power plug), so that I can add an event within the nodes Event-tab.
When using / and inserting the element by I just can give an id to the entire symbol, but cannot access the LED wihtin this symbol....
So now is the question if it is possbile anyway to get control of an element wihtin a template / symbol?
Would be great to get some hints about that.
Regards
Joe
The text was updated successfully, but these errors were encountered: