-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fixed isElementSVG state property issue so it does not get overwritte… #101
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
Conversation
|
Thanks for the fix @petesaia. I haven't noticed any modern browsers ignoring the real |
|
I noticed that in Chrome and Firefox it was not respecting the |
|
FWIW, I'm applying it on a |
|
Very strange. I'm applying it to a element as well and it's working On Fri, Oct 16, 2015 at 9:08 AM Pete Saia notifications@github.com wrote:
|
|
http://www.w3.org/TR/SVG/coords.html#TransformAttribute On Fri, Oct 16, 2015 at 9:15 AM Tyler Martin tyler.r.martin23@gmail.com
|
|
@martinRoss You're absolutely right. I had a style set in CSS which was overwriting the |
…n by getInitialState method. react-grid-layout#83 removed isElementSVG from props and added a default to initialProps and fixed specs
|
Done! |
|
Sweet! |
|
Thanks! |
fixed isElementSVG state property issue so it does not get overwritte…
Hey guys, this is a follow up bug fix to @martinRoss 's fix to SVG elements in IE.
There were two issues:
isElementSVGis being defined ingetInitialState(). This was causing the state to be overwritten (and set back to false) oncomponentWillReceiveProps(). I simply added a check to see if the state already exists, and if it does, it won't re-set to false.render()we should apply the CSS style for transform despite whether or not the element is a SVG. Modern browsers do not respect the realtransformattribute - so essentially the problem was reversed and fixed in IE but broken in Chrome, FF, ect.Tested locally and it's working great. Thanks!