Skip to content

Commit d498fd5

Browse files
committed
Remove duplicate code.
1 parent 9f25c5f commit d498fd5

3 files changed

Lines changed: 9 additions & 20 deletions

File tree

d3.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8305,7 +8305,7 @@ d3 = function() {
83058305
}));
83068306
};
83078307
scale.ticks = function(m, k) {
8308-
var extent = d3_time_scaleExtent(scale.domain());
8308+
var extent = d3_scaleExtent(scale.domain());
83098309
if (typeof m !== "function") {
83108310
var span = extent[1] - extent[0], target = span / m, i = d3.bisect(d3_time_scaleSteps, target);
83118311
if (i == d3_time_scaleSteps.length) return methods.year(extent, m);
@@ -8323,11 +8323,7 @@ d3 = function() {
83238323
scale.copy = function() {
83248324
return d3_time_scale(linear.copy(), methods, format);
83258325
};
8326-
return d3.rebind(scale, linear, "range", "rangeRound", "interpolate", "clamp");
8327-
}
8328-
function d3_time_scaleExtent(domain) {
8329-
var start = domain[0], stop = domain[domain.length - 1];
8330-
return start < stop ? [ start, stop ] : [ stop, start ];
8326+
return d3_scale_linearRebind(scale, linear);
83318327
}
83328328
function d3_time_scaleDate(t) {
83338329
return new Date(t);

0 commit comments

Comments
 (0)