Skip to content

Commit 7c6f81d

Browse files
Math.max is self-documenting here
cleanup for #1385
1 parent 59e0473 commit 7c6f81d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/coordinate-grid-mixin.js

+1-2
Original file line numberDiff line numberDiff line change
@@ -1238,8 +1238,7 @@ dc.coordinateGridMixin = function (_chart) {
12381238
.duration(_chart.transitionDuration());
12391239

12401240
if (_zoomOutRestrict) {
1241-
// Ensure minimum zoomScale is at least 1
1242-
var zoomScaleMin = _zoomScale[0] < 1 ? 1 : _zoomScale[0];
1241+
var zoomScaleMin = Math.max(_zoomScale[0], 1);
12431242
_zoom
12441243
.translateExtent(extent)
12451244
.scaleExtent([zoomScaleMin, _zoomScale[1]]);

0 commit comments

Comments
 (0)