Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
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
Commit
d6e261b9
authored
11 years ago
by
tebjan
Browse files
Options
Download
Email Patches
Plain Diff
remove uses depth first recursion for children
parent
1758a5b5
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
Source/SvgElementCollection.cs
+1
-1
Source/SvgElementCollection.cs
Source/SvgExtentions.cs
+13
-0
Source/SvgExtentions.cs
with
14 additions
and
1 deletion
+14
-1
Source/SvgElementCollection.cs
+
1
-
1
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
);
}
}
}
...
...
This diff is collapsed.
Click to expand it.
Source/SvgExtentions.cs
+
13
-
0
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
);
}
}
}
This diff is collapsed.
Click to expand it.
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
Menu
Projects
Groups
Snippets
Help