seiyable / vue-simple-svg

A simple Vue.js plugin that allows you to load a SVG image as an inline SVG with an access to change its fill colors
MIT License
80 stars 23 forks source link

Disable default colors if not set #4

Closed voidit closed 6 years ago

voidit commented 6 years ago

It would be very helpful to disable color setting completely if nothing was sent as a parameter. For example, if I use multicolored graphics, it will save some juices just to leave it alone instead of redefining styles from scratch after SVG had been loaded. For example, if I place an element like so: <simple-svg :filepath="'/PATH_/TO_/YOUR_/FILE.svg'" :width="'400px'" :height="'400px'" :id="'custom-id'" @ready="onSvgReady()" /> It should not touch existing styles.

seiyable commented 6 years ago

I disabled default parameters and this should solve the issues.

CelticParser commented 5 years ago

Hi, this stil strips the svg's colors and defaults to black.

ayyoubjadoo commented 5 years ago

Hi, Also setting the fill and stroke props to none doesn't work, it's not drawing black but its still discarding the original fill and stroke styles in the svg itself.

Nice plugin BTW and this issue must be fixed to make it perfect.