File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 99 $viewBox = $this.ViewBox
1010 $null , $null , $viewX , $viewY = $viewBox
1111 " <style>canvas {max-width: 100%; height: 100%}</style>"
12- " <canvas id='turtle -canvas' width='$ ( $viewX + 1 ) ' height='$ ( $viewY + 1 ) '></canvas>"
12+ " <canvas id='$ ( $this .ID ) -canvas' width='$ ( $viewX + 1 ) ' height='$ ( $viewY + 1 ) '></canvas>"
1313
1414 " <script>"
1515@"
1616window.onload = async function() {
17- var canvas = document.getElementById('turtle -canvas');
17+ var canvas = document.getElementById('$ ( $this .ID ) -canvas');
1818 var ctx = canvas.getContext('2d');
1919 ctx.strokeStyle = '$ ( $this.Stroke ) '
2020 ctx.lineWidth = '$ (
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ $viewBox = $this.ViewBox
44$null , $null , $viewX , $viewY = $viewBox
55" <svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%'>"
66" <defs>"
7- " <pattern id='turtle -pattern' patternUnits='userSpaceOnUse' width='$viewX ' height='$viewY ' transform-origin='50% 50%'$ (
7+ " <pattern id='$ ( $this .ID ) -pattern' patternUnits='userSpaceOnUse' width='$viewX ' height='$viewY ' transform-origin='50% 50%'$ (
88 if ($this.PatternTransform ) {
99 " patternTransform='" + (
1010 @ (foreach ($key in $this.PatternTransform.Keys ) {
2222 " <rect width='10000%' height='10000%' x='-5000%' y='-5000%' fill='$ ( $this.BackgroundColor ) ' transform-origin='50% 50%' />"
2323 }
2424)
25- " <rect width='10000%' height='10000%' x='-5000%' y='-5000%' fill='url(#turtle -pattern)' transform-origin='50% 50%' />"
25+ " <rect width='10000%' height='10000%' x='-5000%' y='-5000%' fill='url(#$ ( $this .ID ) -pattern)' transform-origin='50% 50%' />"
2626" </svg>" )
2727
2828$segments -join ' ' -as [xml ]
You can’t perform that action at this time.
0 commit comments