Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Commit

Permalink
Merge pull request #101 from viceversus/bug/mock-ART-path
Browse files Browse the repository at this point in the history
Add other Path methods to ART Path mock
  • Loading branch information
RealOrangeOne authored Sep 30, 2016
2 parents 3deb4e2 + a01795f commit 30bea2c
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions src/components/ART/Path.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,25 @@

class Path {
constructor(path) {
[
'push',
'reset',
'move',
'moveTo',
'line',
'lineTo',
'curve',
'curveTo',
'arc',
'arcTo',
'counterArc',
'counterArcTo',
'close'
].forEach((methodName) => { this[methodName] = () => this; });

this.path = path || [];
}
move() {
return this;
}
moveTo() {
return this;
}
line() {
return this;
}
close() {
return this;
}

toJSON() {
return JSON.stringify(this.path);
}
Expand Down

0 comments on commit 30bea2c

Please sign in to comment.