Skip to content

Commit

Permalink
Merge pull request #326 from f3dm76/task/visibilityAttribute
Browse files Browse the repository at this point in the history
Fix #325: Attribute "visibility" is ignored
  • Loading branch information
ystrot authored Apr 24, 2018
2 parents 1751d74 + 26a3e7b commit 7cc7136
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Source/svg/SVGParser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ open class SVGParser {
"fill", "text-anchor", "clip-path", "fill-opacity",
"stop-color", "stop-opacity",
"font-family", "font-size",
"font-weight", "opacity", "color"]
"font-weight", "opacity", "color", "visibility"]

fileprivate let xmlString: String
fileprivate let initialPosition: Transform
Expand Down Expand Up @@ -262,6 +262,10 @@ open class SVGParser {
if styleAttributes["display"] == "none" {
return .none
}
if styleAttributes["visibility"] == "hidden" {
return .none
}


let position = getPosition(element)
switch element.name {
Expand Down

0 comments on commit 7cc7136

Please sign in to comment.