[BUG] Setting SVG meta.visible False does not hide elements with visibility: visible

v8.1.43

I found a weird bug where I have an SVG with bindings on some elements which sets their visibility prop between hidden and visible. However, I also have a binding on the meta.visible prop as well which should hide the entire SVG per condition. If the meta.visible is false but some of the element visibility's are visible, then the SVG is hidden except for those select elements...

E.g.
SVG meta.visible: true
image

SVG meta.visible: false
image

(the purple and two white bars are both elements part of the same SVG)

Note: Setting style.display: none successfully hides the SVG

I don't think this is a bug, I believe the meta.visible is an inherited property, so if you set the visibility on a child directly it overrides it's inherited all together.

correct.
you could use "unset" instead of "true" for the inner elements

3 Likes

meta.visible on the SVG itself though, the parent, should hide the entire SVG, regardless of the child elements. It would be like editing an SVG in Inkscape and hiding a group, but its child elements still being visible because their visible prop is on - that's not correct.

Furthermore though, the SVG itself is embedded into a View and the View is embedded into another view (it's a device symbol) and then the embedded view is hidden with meta.visible: false, but the SVG elements with visibility: visible are stil visible - this isn't correct behaviour