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 @@ -1578,11 +1578,35 @@ $segments -join '' -as [xml]
1578
1578
</GetScriptBlock >
1579
1579
<SetScriptBlock >
1580
1580
param(
1581
- [string ]
1581
+ [PSObject ]
1582
1582
$PatternAnimation
1583
1583
)
1584
1584
1585
- $this | Add-Member -MemberType NoteProperty -Force -Name '.PatternAnimation' -Value $PatternAnimation
1585
+ $newAnimation = @(foreach ($animation in $PatternAnimation) {
1586
+ if ($animation -is [Collections.IDictionary]) {
1587
+ $animationCopy = [Ordered]@{} + $animation
1588
+ if (-not $animationCopy['attributeType']) {
1589
+ $animationCopy['attributeType'] = 'XML'
1590
+ }
1591
+ if (-not $animationCopy['attributeName']) {
1592
+ $animationCopy['attributeName'] = 'patternTransform'
1593
+ }
1594
+ if ($animationCopy.values -is [object[]]) {
1595
+ $animationCopy['values'] = $animationCopy['values'] -join ';'
1596
+ }
1597
+
1598
+ "< animateTransform $(
1599
+ @(foreach ($key in $animationCopy.Keys) {
1600
+ " $key='$([Web.HttpUtility]::HtmlAttributeEncode($animationCopy[$key]))'"
1601
+ }) -join ''
1602
+ )/> "
1603
+ }
1604
+ if ($animation -is [string]) {
1605
+ $animation
1606
+ }
1607
+ })
1608
+
1609
+ $this | Add-Member -MemberType NoteProperty -Force -Name '.PatternAnimation' -Value $newAnimation
1586
1610
1587
1611
</SetScriptBlock >
1588
1612
</ScriptProperty >
You can’t perform that action at this time.
0 commit comments