Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
25
node_modules/d3-shape/src/curve/linearClosed.js
generated
vendored
Normal file
25
node_modules/d3-shape/src/curve/linearClosed.js
generated
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import noop from "../noop.js";
|
||||
|
||||
function LinearClosed(context) {
|
||||
this._context = context;
|
||||
}
|
||||
|
||||
LinearClosed.prototype = {
|
||||
areaStart: noop,
|
||||
areaEnd: noop,
|
||||
lineStart: function() {
|
||||
this._point = 0;
|
||||
},
|
||||
lineEnd: function() {
|
||||
if (this._point) this._context.closePath();
|
||||
},
|
||||
point: function(x, y) {
|
||||
x = +x, y = +y;
|
||||
if (this._point) this._context.lineTo(x, y);
|
||||
else this._point = 1, this._context.moveTo(x, y);
|
||||
}
|
||||
};
|
||||
|
||||
export default function(context) {
|
||||
return new LinearClosed(context);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue