Closed marick closed 7 years ago
Hey! Sorry, long time in responding :/
You can do this if you use Animation.attr "height" 0 "px"
, which manually specifies something that should render as an attribute instead of a style property.
I've put this on the list of things I'm looking at (rendering Animation.height
as both a property and a style attribute) when I work on the next major revision.
Thanks!
I'm animating SVG
rect
elements to show fluid levels decreasing.rect
usesheight
andwidth
attributes. Those aren't animatable via the API. I realize I could usepoints
instead ofrect
, but these attributes might be broadly useful. (Alternately, perhaps a way to set custom SVG attributes, though the case statement in the code suggests that isn't straightforward.)Interestingly, you can use the HTML height attribute, which results in an element like this:
That actually works in both Chrome and Safari, but not in Firefox.