@@ -1281,12 +1281,12 @@ $this | Add-Member NoteProperty -Name '.BackgroundColor' -Value $value -Force
1281
1281
$viewBox = $this.ViewBox
1282
1282
$null, $null, $viewX, $viewY = $viewBox
1283
1283
"< style> canvas {max-width: 100%; height: 100%}< /style> "
1284
- "< canvas id='turtle -canvas' width='$($viewX + 1)' height='$($viewY + 1)'>< /canvas> "
1284
+ "< canvas id='$($this.ID) -canvas' width='$($viewX + 1)' height='$($viewY + 1)'>< /canvas> "
1285
1285
1286
1286
"< script> "
1287
1287
@"
1288
1288
window.onload = async function() {
1289
- var canvas = document.getElementById('turtle -canvas');
1289
+ var canvas = document.getElementById('$($this.ID) -canvas');
1290
1290
var ctx = canvas.getContext('2d');
1291
1291
ctx.strokeStyle = '$($this.Stroke)'
1292
1292
ctx.lineWidth = '$(
@@ -1628,7 +1628,7 @@ $viewBox = $this.ViewBox
1628
1628
$null, $null, $viewX, $viewY = $viewBox
1629
1629
"< svg xmlns='http://www.w3.org/2000/svg' width='100%' height='100%'> "
1630
1630
"< defs> "
1631
- "< pattern id='turtle -pattern' patternUnits='userSpaceOnUse' width='$viewX' height='$viewY' transform-origin='50% 50%'$(
1631
+ "< pattern id='$($this.ID) -pattern' patternUnits='userSpaceOnUse' width='$viewX' height='$viewY' transform-origin='50% 50%'$(
1632
1632
if ($this.PatternTransform) {
1633
1633
" patternTransform='" + (
1634
1634
@(foreach ($key in $this.PatternTransform.Keys) {
1646
1646
"< rect width='10000%' height='10000%' x='-5000%' y='-5000%' fill='$($this.BackgroundColor)' transform-origin='50% 50%' /> "
1647
1647
}
1648
1648
)
1649
- "< rect width='10000%' height='10000%' x='-5000%' y='-5000%' fill='url(#turtle -pattern)' transform-origin='50% 50%' /> "
1649
+ "< rect width='10000%' height='10000%' x='-5000%' y='-5000%' fill='url(#$($this.ID) -pattern)' transform-origin='50% 50%' /> "
1650
1650
"< /svg> ")
1651
1651
1652
1652
$segments -join '' -as [xml]
0 commit comments