-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Enable display svg prop #1220
Comments
Can you try with the latest commit from the develop branch? |
msand
pushed a commit
that referenced
this issue
Jan 4, 2020
# [9.14.0](v9.13.6...v9.14.0) (2020-01-04) ### Bug Fixes * **android:** correct values for measureInWindow, fixes [#1231](#1231) ([3bf07f8](3bf07f8)) * **android:** elements not touchable if below opacity limit ([ebc7220](ebc7220)), closes [#1200](#1200) * **android:** fix radial gradient vertical center offset scaling ([d5bddd5](d5bddd5)) * **ios:** crash when offset is outside range [#1201](#1201) ([a2ef51f](a2ef51f)) * **web:** fix gesture responder dimensions measurement ([36c20b3](36c20b3)) * extraction of clip rule, fixes [#1233](#1233) ([f93bdde](f93bdde)) * Text color doesn't work with inlineSize [#1225](#1225) ([027b8c1](027b8c1)) ### Features * **android:** support using other native views in e.g. masks ([15b4ac6](15b4ac6)) * **ios:** support using other native views in e.g. masks ([518a3b1](518a3b1)) * **web:** Implement support for event, touch & responder handlers ([60561ec](60561ec)) * **web:** Optimize: only set responders if press handler exists ([23250ad](23250ad)) * Implement display="none" ([3e3ad13](3e3ad13)), closes [#1220](#1220)
Released in v10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature Request
The SVG spec specifies a
display
prop that is not currently used inreact-native-svg
https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/display
Why it is needed
I'm using SvgCssUri and sometimes the remote SVG comes with a
display="none"
prop that is not handled and is displaying the hidden elements.Here is an example of the SVG: https://res.cloudinary.com/nivelat-staging/image/upload/v1517432918/vehiculo-parte-freno_iiy2fv.svg
The problematic part of that SVG is this:
Here is how it's displayed on Web
![](https://camo.githubusercontent.com/7670a14b7f199e8792b33a6ae37dc00ff4ad3055dd434cc11b31be6d07ab9518/68747470733a2f2f692e6962622e636f2f30566a48704a7a2f7376672d7765622e706e67)
And here is how it's displayed on Mobile
![](https://camo.githubusercontent.com/4d47bdcf4203001377233e8553aa6020f855c4487b2ea8038223bf908039b61e/68747470733a2f2f692e6962622e636f2f4d52795a326e6b2f7376672d6d6f62696c652e6a7067)
Possible implementation
I fixed it by adding the display prop to the
extractProps
method and returning null when a group has that prop, but I guess it should be implemented on every shape.morellan@80c09fc
Code sample
The text was updated successfully, but these errors were encountered: