-
Notifications
You must be signed in to change notification settings - Fork 55
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
Aspect Ratio Ignored in iOS #39
Comments
@victorsosa any idea what might be going on here? should this plugin get updated to create a container and manually respect the preserveAspectRatio settings? |
@drewcovi no idea; viewbox and preserveaspectratio parameters? please show me where are those?? or how to use them |
They’re properties on any given svg element including the Nativescript svg included in this plugin. They’re used to ensure proportional scaling. I’ll hunt down an example of how this was done in React Native land. |
that's true |
@victorsosa darn. it looks like the most routinely maintained library for React Native doesn't use SVGKit, but the approach is still the same. I believe in nativescript one could simply create a parent view that handles centering/scaling. This is a consequence of SVGKFastImageView (which if it inherits some of imageview I believe defaults to scaling regardless of aspect ratio). |
@victorsosa seems this is a known issue in SVGKit SVGKit/SVGKit#261 |
Is there any way to enforce aspect ratio in iOS? At present, the nativescript.svg stretches to fill the width of the container and height, completely ignoring both viewbox and preserveaspectratio parameters.
The text was updated successfully, but these errors were encountered: