We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Turtle.js.get_PathData
1 parent 0d9e3cd commit 52757adCopy full SHA for 52757ad
Types/Turtle.js/pathData.js
@@ -1 +1,13 @@
1
-function pathData() { return `m ${this.min.x * -1} ${this.min.y * -1} ${this.steps.join(' ')} ` }
+function get_pathData() {
2
+ let startX = 0;
3
+ let startY = 0;
4
+ if (!this.min) { this.min = { x: 0.0, y: 0.0}}
5
+ if (!this.max) { this.max = { x: 0.0, y: 0.0}}
6
+ if (this.min.x < 0) {
7
+ startX = (this.min.x) * -1
8
+ }
9
+ if (this.min.y < 0) {
10
+ startY = (this.min.y) * -1
11
12
+ return `m ${startX} ${startY} ${this.steps?.join(' ')}`
13
+}
0 commit comments