source: node_modules/d3-geo/src/clip/buffer.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: 479 bytes
Line 
1import noop from "../noop.js";
2
3export default function() {
4 var lines = [],
5 line;
6 return {
7 point: function(x, y, m) {
8 line.push([x, y, m]);
9 },
10 lineStart: function() {
11 lines.push(line = []);
12 },
13 lineEnd: noop,
14 rejoin: function() {
15 if (lines.length > 1) lines.push(lines.pop().concat(lines.shift()));
16 },
17 result: function() {
18 var result = lines;
19 lines = [];
20 line = null;
21 return result;
22 }
23 };
24}
Note: See TracBrowser for help on using the repository browser.