Skip to content

Commit ce1746f

Browse files
StartAutomatingStartAutomating
authored andcommitted
docs: Turtle.get_AnimateMotion output typing ( Fixes #266 )
1 parent f777301 commit ce1746f

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

Turtle.types.ps1xml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3805,13 +3805,26 @@ $this.GoTo($this.Position.X, $this.Position.Y + $Distance)
38053805
<ScriptProperty>
38063806
<Name>AnimateMotion</Name>
38073807
<GetScriptBlock>
3808-
@("&lt;animateMotion dur='$(
3809-
if ($this.AnimateMotionDuration) {
3810-
$this.AnimateMotionDuration
3808+
&lt;#
3809+
.SYNOPSIS
3810+
Gets a Turtle's animation motion
3811+
.DESCRIPTION
3812+
Gets a Turtle's path as an animation motion.
3813+
3814+
This only provides the animation path of this turtle, not any turtles contained within this turtle.
3815+
#&gt;
3816+
[OutputType([xml])]
3817+
param()
3818+
3819+
[xml]@(
3820+
"&lt;animateMotion dur='$(
3821+
if ($this.Duration -is [TimeSpan]) {
3822+
"$($this.Duration.TotalSeconds)s"
38113823
} else {
38123824
"$(($this.Points.Length / 2 / 10))s"
38133825
}
3814-
)' repeatCount='indefinite' path='$($this.PathData)' /&gt;") -as [xml]
3826+
)' repeatCount='indefinite' path='$($this.PathData)' /&gt;
3827+
")
38153828
</GetScriptBlock>
38163829
</ScriptProperty>
38173830
<ScriptProperty>

0 commit comments

Comments
 (0)