use _ instead of this
This commit is contained in:
parent
4091f476ff
commit
83778bb129
4
draw.js
4
draw.js
|
@ -340,9 +340,9 @@ class Drawing {
|
|||
i += 1;
|
||||
}
|
||||
d.definePoint(name, () => {
|
||||
return (function() {
|
||||
return (function(_) {
|
||||
return eval(body);
|
||||
}).call(d);
|
||||
})(d);
|
||||
});
|
||||
} break;
|
||||
case 'circle':
|
||||
|
|
6
test.md
6
test.md
|
@ -10,14 +10,14 @@ caption This is a test
|
|||
buttons
|
||||
frame 0 0 200 100
|
||||
axes 200 100
|
||||
point p1 this.oscillatingPoint([20, 20], [80, 20], 3000)
|
||||
point p1 _.oscillatingPoint([20, 20], [80, 20], 3000)
|
||||
fill cyan
|
||||
square p1 1000
|
||||
point p2 [100, 30]
|
||||
fill red
|
||||
circle p2
|
||||
point p3 [ this.oscillatingValue(20, 80, 3000),
|
||||
this.oscillatingValue(20, 80, 3000, Math.PI/2) ]
|
||||
point p3 [ _.oscillatingValue(20, 80, 3000),
|
||||
_.oscillatingValue(20, 80, 3000, Math.PI/2) ]
|
||||
fill green
|
||||
circle p3 1000
|
||||
start
|
||||
|
|
Loading…
Reference in New Issue