Fix projection.clipExtent edge case.
A slight correction to clipLine fixed the problem with points lying exactly on the clip edge, but in case clipLine(a, b) ever returns false (no intersections) even though v_=0 and v=1, we treat this as the start of a line anyway.
This commit is contained in:
Родитель
d8903ef00b
Коммит
fa514dd08c
|
@ -2788,7 +2788,7 @@ d3 = function() {
|
|||
}
|
||||
}
|
||||
function d3_geo_clipViewT(num, denominator, t) {
|
||||
if (Math.abs(denominator) < ε) return num < 0;
|
||||
if (Math.abs(denominator) < ε) return num <= 0;
|
||||
var u = num / denominator;
|
||||
if (denominator > 0) {
|
||||
if (u > t[1]) return false;
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -134,6 +134,9 @@ function d3_geo_clipView(x0, y0, x1, y1) {
|
|||
}
|
||||
listener.point(b[0], b[1]);
|
||||
if (!v) listener.lineEnd();
|
||||
} else {
|
||||
listener.lineStart();
|
||||
listener.point(x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -197,7 +200,7 @@ function d3_geo_clipView(x0, y0, x1, y1) {
|
|||
}
|
||||
|
||||
function d3_geo_clipViewT(num, denominator, t) {
|
||||
if (Math.abs(denominator) < ε) return num < 0;
|
||||
if (Math.abs(denominator) < ε) return num <= 0;
|
||||
|
||||
var u = num / denominator;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче