Files
iD/js/lib/d3.size.js
2012-12-01 08:16:50 -08:00

9 lines
245 B
JavaScript

d3.selection.prototype.size = function (size) {
if (!arguments.length) {
var node = this.node();
return [node.offsetWidth,
node.offsetHeight];
}
return this.attr({width: size[0], height: size[1]});
};