Commit ba48daa1 authored by Jason Davies's avatar Jason Davies
Browse files

Simplify.

parent b89c2d97
......@@ -3052,16 +3052,18 @@ d3 = function() {
listener = listener_;
segments = d3.merge(segments);
var inside = clean && insidePolygon([ x0, y0 ]), visible = segments.length;
if (inside || visible) listener.polygonStart();
if (inside) {
listener.lineStart();
interpolate(null, null, 1, listener);
listener.lineEnd();
}
if (visible) {
d3_geo_clipPolygon(segments, compare, pointInside, interpolate, listener);
if (inside || visible) {
listener.polygonStart();
if (inside) {
listener.lineStart();
interpolate(null, null, 1, listener);
listener.lineEnd();
}
if (visible) {
d3_geo_clipPolygon(segments, compare, pointInside, interpolate, listener);
}
listener.polygonEnd();
}
if (inside || visible) listener.polygonEnd();
segments = polygon = ring = null;
}
};
......
This diff is collapsed.
......@@ -49,16 +49,18 @@ function d3_geo_clipExtent(x0, y0, x1, y1) {
segments = d3.merge(segments);
var inside = clean && insidePolygon([x0, y0]),
visible = segments.length;
if (inside || visible) listener.polygonStart();
if (inside) {
listener.lineStart();
interpolate(null, null, 1, listener);
listener.lineEnd();
}
if (visible) {
d3_geo_clipPolygon(segments, compare, pointInside, interpolate, listener);
if (inside || visible) {
listener.polygonStart();
if (inside) {
listener.lineStart();
interpolate(null, null, 1, listener);
listener.lineEnd();
}
if (visible) {
d3_geo_clipPolygon(segments, compare, pointInside, interpolate, listener);
}
listener.polygonEnd();
}
if (inside || visible) listener.polygonEnd();
segments = polygon = ring = null;
}
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment