File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -472,6 +472,36 @@ return $this.L('FX+FX+', [Ordered]@{
472472)' repeatCount='indefinite' path='$($this.PathData)' /> ") -as [xml]
473473 </GetScriptBlock >
474474 </ScriptProperty >
475+ <ScriptProperty >
476+ <Name >AnimateMotionDuration</Name >
477+ <GetScriptBlock >
478+ if ($this.'.AnimateMotionDuration') {
479+ return $this.'.AnimateMotionDuration'
480+ }
481+ $thesePoints = $this.Points
482+ if ($thesePoints.Length -eq 0) {
483+ return "$(($thesePoints.Length / 2 / 10))s"
484+ }
485+
486+ </GetScriptBlock >
487+ <SetScriptBlock >
488+ param(
489+ [PSObject]
490+ $AnimateMotionDuration
491+ )
492+
493+ if ($AnimateMotionDuration -is [TimeSpan]) {
494+ $AnimateMotionDuration = $AnimateMotionDuration.TotalSeconds + 's'
495+ }
496+
497+ if ($AnimateMotionDuration -is [int] -or $AnimateMotionDuration -is [double]) {
498+ $AnimateMotionDuration = "${AnimateMotionDuration}s"
499+ }
500+
501+ $this | Add-Member -MemberType NoteProperty -Force -Name '.AnimateMotionDuration' -Value $AnimateMotionDuration
502+
503+ </SetScriptBlock >
504+ </ScriptProperty >
475505 <ScriptProperty >
476506 <Name >Heading</Name >
477507 <GetScriptBlock >
You can’t perform that action at this time.
0 commit comments