1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-08-15 16:10:39 +03:00

Fix #388: fix fill for group with currentColor

This commit is contained in:
Daniil Manin 2019-05-20 17:05:45 +07:00
parent c8c9505b83
commit 9a3c7293f3

View File

@ -571,9 +571,14 @@ open class SVGParser {
}
}
let hasCurrentColor = styleAttributes["fill"] == "currentColor"
self.availableStyleAttributes.forEach { availableAttribute in
if let styleAttribute = element.allAttributes[availableAttribute]?.text, styleAttribute != "inherit" {
styleAttributes.updateValue(styleAttribute, forKey: availableAttribute)
if !hasCurrentColor || availableAttribute != "color" {
styleAttributes.updateValue(styleAttribute, forKey: availableAttribute)
}
}
}