Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Animated viewBox property not passed to the rendered element #641

Closed
vllgth opened this issue Apr 18, 2019 · 3 comments
Closed

Animated viewBox property not passed to the rendered element #641

vllgth opened this issue Apr 18, 2019 · 3 comments
Labels
kind: bug Something isn't working
Milestone

Comments

@vllgth
Copy link

vllgth commented Apr 18, 2019

🐛 Bug Report

I was trying to animate the viewBox property of an SVG element. It seems that "viewBox" is converted to "view-box". I tried to use "viewbox" instead, but the property "viewbox" will be ignored by most browsers.

To Reproduce

<animated.svg viewBox={interpViewBox}>...</animated.svg>

renders to

<svg viewBox="...(initial interp. value of spring)..." view-box="...(animated values)...">...</svg>

Expected behavior

<animated.svg viewBox={interpViewBox}>...</animated.svg>

should render to

<svg viewBox="...(initial/animated values)...">...</svg>

Link to repro

CodeSandbox demo from this existing demo (Line 18 was added and line 30 was changed). By inspecting the SVG element and scrolling down a little, it should show the described behavior.

Environment

  • react-spring v8.0.19
  • react v16.8.6
@vllgth vllgth added the kind: bug Something isn't working label Apr 18, 2019
aleclarson added a commit that referenced this issue Apr 23, 2019
@aleclarson
Copy link
Contributor

Addressed by ee44674, will be published in v9.0.0

@aleclarson aleclarson added this to the v9.0.0 milestone Apr 23, 2019
@aleclarson aleclarson mentioned this issue Apr 23, 2019
5 tasks
@aleclarson
Copy link
Contributor

Hello @vllgth. Can you confirm if your bug is fixed by installing react-spring@next? Thanks.

aleclarson added a commit that referenced this issue Jun 1, 2019
@forgo
Copy link

forgo commented May 19, 2020

I just ran into this problem on v8, and using the "next" version which installed 9.0.0-rc.3 fixed the issue I had with animating viewBox in a chain of springs.

When will the official version 9 be released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants