Skip to content

Conversation

@ninmonkey
Copy link
Contributor

Turtle.js.get_heading was returning NaN which broke output of Turtle.js.ToHTML

This fixes: #339 , #336 , #337 , #338

original error

turtle.html:159 Uncaught TypeError: turtle.pathData is not a function
    at draw (turtle.html:159:28)
    at turtle.html:167:1
draw @ turtle.html:159
(anonymous) @ turtle.html:167

Test case

$turt = turtle square 42 stroke blue fill salmon opacity 1.0
$turt.PSTypeNames.Insert(0, 'Turtle.Js')
$turt.ToHTML() | Set-Content -Path  'turtle.html'
Get-Item 'turtle.html' | Get-Item | Invoke-Item

@ninmonkey ninmonkey marked this pull request as ready for review November 1, 2025 14:05
@ninmonkey ninmonkey changed the title [Bug]: fixes: Turtle.js.pathData returns NaN paths fixes: Turtle.js.pathData returns NaN paths ( fixes: #339, fixes: #336, fixes: #337, fixes: #338 ) Nov 1, 2025
@ninmonkey ninmonkey changed the title fixes: Turtle.js.pathData returns NaN paths ( fixes: #339, fixes: #336, fixes: #337, fixes: #338 ) fix: Turtle.js.pathData returns NaN paths ( fixes: #339, fixes: #336, fixes: #337, fixes: #338 ) Nov 1, 2025
@StartAutomating
Copy link
Member

@ninmonkey I'll take this PR but ToHTML was removed (too prescriptive for this point of development)

@StartAutomating StartAutomating merged commit c7c1860 into PowerShellWeb:turtles-in-svg Nov 1, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants