Open njesenberger opened 3 weeks ago
transformOrigin is not dynamically calculated and defaults to 0px 0px for SVG elements that are not displayed on initial render because they or their parent are set to display: none.
transformOrigin
0px 0px
display: none
Minimal reproduction on CodeSandbox
Steps to reproduce:
none
initial
Expected behavior:
transformOrigin should be dynamically calculated based on originX and originY values.
originX
originY
Note:
A workaround for elements that do not need a dynamic transformOrigin is to manually set originX and originY as strings (either px or %).
px
%
Documentation mentions the same workaround for animating scale and rotate on SVG elements with server-side rendering.
scale
rotate
Related issue: #621
transformOrigin
is not dynamically calculated and defaults to0px 0px
for SVG elements that are not displayed on initial render because they or their parent are set todisplay: none
.Minimal reproduction on CodeSandbox
Steps to reproduce:
none
toinitial
Expected behavior:
transformOrigin
should be dynamically calculated based onoriginX
andoriginY
values.Note:
A workaround for elements that do not need a dynamic
transformOrigin
is to manually setoriginX
andoriginY
as strings (eitherpx
or%
).Documentation mentions the same workaround for animating
scale
androtate
on SVG elements with server-side rendering.Related issue: #621