File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change 1
1
param (
2
- [string ]
2
+ [PSObject ]
3
3
$PatternAnimation
4
4
)
5
5
6
- $this | Add-Member - MemberType NoteProperty - Force - Name ' .PatternAnimation' - Value $PatternAnimation
6
+ $newAnimation = @ (foreach ($animation in $PatternAnimation ) {
7
+ if ($animation -is [Collections.IDictionary ]) {
8
+ $animationCopy = [Ordered ]@ {} + $animation
9
+ if (-not $animationCopy [' attributeType' ]) {
10
+ $animationCopy [' attributeType' ] = ' XML'
11
+ }
12
+ if (-not $animationCopy [' attributeName' ]) {
13
+ $animationCopy [' attributeName' ] = ' patternTransform'
14
+ }
15
+ if ($animationCopy.values -is [object []]) {
16
+ $animationCopy [' values' ] = $animationCopy [' values' ] -join ' ;'
17
+ }
18
+
19
+ " <animateTransform $ (
20
+ @ (foreach ($key in $animationCopy.Keys ) {
21
+ " $key ='$ ( [Web.HttpUtility ]::HtmlAttributeEncode($animationCopy [$key ])) '"
22
+ }) -join ' '
23
+ ) />"
24
+ }
25
+ if ($animation -is [string ]) {
26
+ $animation
27
+ }
28
+ })
29
+
30
+ $this | Add-Member - MemberType NoteProperty - Force - Name ' .PatternAnimation' - Value $newAnimation
You can’t perform that action at this time.
0 commit comments