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]
15781578 </GetScriptBlock >
15791579 <SetScriptBlock >
15801580 param(
1581- [string ]
1581+ [PSObject ]
15821582$PatternAnimation
15831583)
15841584
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
15861610
15871611 </SetScriptBlock >
15881612 </ScriptProperty >
You can’t perform that action at this time.
0 commit comments