Skip to content

Commit

Permalink
Shorten.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasondavies committed May 20, 2014
1 parent 43591cc commit 8d92702
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions longscroll/longscroll.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,27 +47,19 @@ d3.longscroll = function() {
}

longscroll.render = function(_) {
if (!arguments.length) return render;
render = _;
return longscroll;
return arguments.length ? (render = _, longscroll) : render;
};

longscroll.rowHeight = function(_) {
if (!arguments.length) return rowHeight;
rowHeight = +_;
return longscroll;
return arguments.length ? (rowHeight = +_, longscroll) : rowHeight;
};

longscroll.position = function(_) {
if (!arguments.length) return position;
position = +_;
return longscroll;
return arguments.length ? (position = +_, longscroll) : position;
};

longscroll.size = function(_) {
if (!arguments.length) return size;
size = +_;
return longscroll;
return arguments.length ? (size = +_, longscroll) : size;
};

return longscroll;
Expand Down

0 comments on commit 8d92702

Please sign in to comment.