You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm animating SVG rect elements to show fluid levels decreasing. rect uses height and width attributes. Those aren't animatable via the API. I realize I could use points instead of rect, 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:
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.
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.
The text was updated successfully, but these errors were encountered: