Visibility attribute being stripped from SVG component

[This is for 8.1.15, Perspective]

I hand crafted a fancy SVG and embedded it into a Perspective screen. Then I manually added a visibility attribute (bound to a boolean value) to a subsection of the SVG in order to animate just that part:

Screen Shot 2022-05-10 at 9.39.10 AM

But when I view the SVG in the session the visibility attribute is not there:

Screen Shot 2022-05-10 at 9.43.03 AM

Is there anyway to achieve what I want? (And have I correctly tried to add the visibility attribute?).

I know from previous conversations that because of the size of the SVG spec that Ignition doesn’t/can’t support all of the features when importing an SVG, but I am surprised that manually added attributes are being removed when the SVG is being spit out onto a screen. (I also noted that the name attribute was also stripped out)

Looks to me as though you have it implemented correctly, however, according to visibility - SVG: Scalable Vector Graphics | MDN browser compatibility is “unknown”.

As a workaround you could use the css attribute opacity on the style of that element and animate that between 1 and 0 to achieve the effect.

I don’t trust that link as compatibility is “unknown” for everything. That seems suspicious for an HTML attribute that has been around for a looooooong time.

However after trying your idea about opacity via the style (which did work), I tested manually adding the visibility attribute to the style:

Screen Shot 2022-05-10 at 10.20.20 AM

Which achieved what I wanted:

It’s a non-intuitive way to do it, but it works for me.

1 Like