source: node_modules/d3-shape/src/curve/linearClosed.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: 517 bytes
Line 
1import noop from "../noop.js";
2
3function LinearClosed(context) {
4 this._context = context;
5}
6
7LinearClosed.prototype = {
8 areaStart: noop,
9 areaEnd: noop,
10 lineStart: function() {
11 this._point = 0;
12 },
13 lineEnd: function() {
14 if (this._point) this._context.closePath();
15 },
16 point: function(x, y) {
17 x = +x, y = +y;
18 if (this._point) this._context.lineTo(x, y);
19 else this._point = 1, this._context.moveTo(x, y);
20 }
21};
22
23export default function(context) {
24 return new LinearClosed(context);
25}
Note: See TracBrowser for help on using the repository browser.