svg-icon icon indicating copy to clipboard operation
svg-icon copied to clipboard

Let us define our own preserveAspectRatio for SVGs

Open jep-a opened this issue 3 years ago • 1 comments

I'm submitting a...

Feature Request

Current behavior

The preserveAspectRatio attribute of all SVGs are always overriden to be xMidYMid meet in registry.ts#L45

Expected behavior/Proposed solution

An input on the component to set this attribute would be nice. It could also default to that value this library sets it to so there's no breaking changes.

Minimal reproduction of the problem with instructions

Generate an SVG with a preserveAspectRatio value that is not xMidYMid meet and it will always be set to xMidYMid meet

What is the motivation / use case for changing the behavior?

I'd like to output an SVG with a custom preserveAspectRatio to render it/align it differently but cannot

jep-a avatar Jun 20 '22 23:06 jep-a

You're welcome to create a PR

NetanelBasal avatar Jun 21 '22 05:06 NetanelBasal

Added in v5

NetanelBasal avatar Nov 03 '22 15:11 NetanelBasal