MCPcopy Create free account
hub / github.com/idank/explainshell / ringEnd

Function ringEnd

explainshell/web/static/js/d3.v3.js:2413–2435  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2411 ring = [];
2412 }
2413 function ringEnd() {
2414 pointRing(ring[0][0], ring[0][1]);
2415 ringListener.lineEnd();
2416 var clean = ringListener.clean(), ringSegments = buffer.buffer(), segment, n = ringSegments.length;
2417 if (!n) {
2418 invisible = true;
2419 invisibleArea += d3_geo_clipAreaRing(ring, -1);
2420 ring = null;
2421 return;
2422 }
2423 ring = null;
2424 if (clean & 1) {
2425 segment = ringSegments[0];
2426 visibleArea += d3_geo_clipAreaRing(segment, 1);
2427 var n = segment.length - 1, i = -1, point;
2428 listener.lineStart();
2429 while (++i < n) listener.point((point = segment[i])[0], point[1]);
2430 listener.lineEnd();
2431 return;
2432 }
2433 if (n > 1 && clean & 2) ringSegments.push(ringSegments.pop().concat(ringSegments.shift()));
2434 segments.push(ringSegments.filter(d3_geo_clipSegmentLength1));
2435 }
2436 return clip;
2437 };
2438 }

Callers

nothing calls this directly

Calls 2

pointRingFunction · 0.85
d3_geo_clipAreaRingFunction · 0.85

Tested by

no test coverage detected