File tree Expand file tree Collapse file tree 1 file changed +12
-21
lines changed
Expand file tree Collapse file tree 1 file changed +12
-21
lines changed Original file line number Diff line number Diff line change @@ -359,30 +359,21 @@ class SVGData extends Group {
359359
360360
361361 private function getStyles (inNode : Xml , inPrevStyles : StringMap <String >): StringMap <String > {
362-
363- if (! inNode .exists (" style" ))
364- return inPrevStyles ;
365362
366- var styles = new StringMap <String > ();
367-
368- if (inPrevStyles != null ) {
369-
370- for (s in inPrevStyles .keys ()) {
371-
372- styles .set (s , inPrevStyles .get (s ));
363+ var styles = inPrevStyles != null ? inPrevStyles .copy () : new StringMap <String > ();
364+
365+ if (inNode .exists (" style" )) {
366+
367+ var style = inNode .get (" style" );
368+ var strings = mStyleSplit .split (style );
373369
374- }
370+ for ( s in strings ) {
375371
376- }
377-
378- var style = inNode .get (" style" );
379- var strings = mStyleSplit .split (style );
380-
381- for (s in strings ) {
382-
383- if (mStyleValue .match (s )) {
384-
385- styles .set (mStyleValue .matched (1 ), mStyleValue .matched (2 ));
372+ if (mStyleValue .match (s )) {
373+
374+ styles .set (mStyleValue .matched (1 ), mStyleValue .matched (2 ));
375+
376+ }
386377
387378 }
388379
You can’t perform that action at this time.
0 commit comments