source: node_modules/d3-delaunay/src/polygon.js@ e4c61dd

Last change on this file since e4c61dd was e4c61dd, checked in by istevanoska <ilinastevanoska@…>, 6 months ago

Prototype 1.1

  • Property mode set to 100644
File size: 278 bytes
RevLine 
[e4c61dd]1export default class Polygon {
2 constructor() {
3 this._ = [];
4 }
5 moveTo(x, y) {
6 this._.push([x, y]);
7 }
8 closePath() {
9 this._.push(this._[0].slice());
10 }
11 lineTo(x, y) {
12 this._.push([x, y]);
13 }
14 value() {
15 return this._.length ? this._ : null;
16 }
17}
Note: See TracBrowser for help on using the repository browser.