Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ImportedProjects
SVG
Commits
d6e261b9
"Source/vscode:/vscode.git/clone" did not exist on "1a00f391ca24d95087ee1842d6f26a100c911e0d"
Commit
d6e261b9
authored
Mar 29, 2014
by
tebjan
Browse files
remove uses depth first recursion for children
parent
1758a5b5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Source/SvgElementCollection.cs
View file @
d6e261b9
...
...
@@ -156,7 +156,7 @@ namespace Svg
if
(
this
.
_owner
.
OwnerDocument
!=
null
)
{
item
.
ApplyRecursive
(
this
.
_owner
.
OwnerDocument
.
IdManager
.
Remove
);
item
.
ApplyRecursive
DepthFirst
(
this
.
_owner
.
OwnerDocument
.
IdManager
.
Remove
);
}
}
}
...
...
Source/SvgExtentions.cs
View file @
d6e261b9
...
...
@@ -81,5 +81,18 @@ namespace Svg
}
}
}
public
static
void
ApplyRecursiveDepthFirst
(
this
SvgElement
elem
,
Action
<
SvgElement
>
action
)
{
if
(!(
elem
is
SvgDocument
))
//don't apply action to subtree of documents
{
foreach
(
var
element
in
elem
.
Children
)
{
element
.
ApplyRecursiveDepthFirst
(
action
);
}
}
action
(
elem
);
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment