Skip to content

Commit 7a4a8ec

Browse files
committed
Fix for negative-size nodes in IE9. Fixes d3#498.
1 parent 76400ac commit 7a4a8ec

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

examples/treemap/treemap.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ function cell() {
4848
this
4949
.style("left", function(d) { return d.x + "px"; })
5050
.style("top", function(d) { return d.y + "px"; })
51-
.style("width", function(d) { return d.dx - 1 + "px"; })
52-
.style("height", function(d) { return d.dy - 1 + "px"; });
51+
.style("width", function(d) { return Math.max(0, d.dx - 1) + "px"; })
52+
.style("height", function(d) { return Math.max(0, d.dy - 1) + "px"; });
5353
}

0 commit comments

Comments
 (0)