Ignore negative areas in treemap layout.

This commit is contained in:
Jason Davies 2011-07-12 16:48:27 +01:00
Родитель da1006c501
Коммит ae6ce3f373
3 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -1735,7 +1735,7 @@ d3.layout.treemap = function() {
row.area = 0;
while ((n = children.length) > 0) {
child = children[n - 1];
if (!child.area) {
if (isNaN(child.area) || child.area <= 0) {
children.pop();
continue;
}

2
d3.layout.min.js поставляемый

Различия файлов скрыты, потому что одна или несколько строк слишком длинны

Просмотреть файл

@ -33,7 +33,7 @@ d3.layout.treemap = function() {
row.area = 0;
while ((n = children.length) > 0) {
child = children[n - 1];
if (!child.area) {
if (isNaN(child.area) || child.area <= 0) {
children.pop();
continue;
}