From 0cba5aa616a989baa82505062a208803be93717f Mon Sep 17 00:00:00 2001 From: Alisa Mylnikova Date: Thu, 19 Apr 2018 12:35:46 +0700 Subject: [PATCH] Fix #325: Attribute "visibility" is ignored --- Source/svg/SVGParser.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/svg/SVGParser.swift b/Source/svg/SVGParser.swift index fb4064b4..cc6555da 100644 --- a/Source/svg/SVGParser.swift +++ b/Source/svg/SVGParser.swift @@ -44,8 +44,8 @@ open class SVGParser { let availableStyleAttributes = ["stroke", "stroke-width", "stroke-opacity", "stroke-dasharray", "stroke-linecap", "stroke-linejoin", "fill", "text-anchor", "clip-path", "fill-opacity", "stop-color", "stop-opacity", - "font-family", "font-size", - "font-weight", "opacity"] + "font-family", "font-size", "font-weight", + "opacity", "visibility"] fileprivate let xmlString: String fileprivate let initialPosition: Transform @@ -262,6 +262,9 @@ open class SVGParser { if styleAttributes["display"] == "none" { return .none } + if styleAttributes["visibility"] == "hidden" { + return .none + } let position = getPosition(element) switch element.name {