Skip to content

Commit f23acf7

Browse files
committed
delete more dead code
1 parent c79b3d1 commit f23acf7

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

src/legends/ramp.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,12 @@ export function legendRamp(color, options) {
7777
// divides the horizontal extent of the legend. (In the common case, the
7878
// domain.length is two, and so the range is simply the extent.) For a
7979
// diverging scale, we need an extra point in the range for the pivot such
80-
// that the pivot is always drawn in the middle. For a threshold scale, we
81-
// add some space below and above.
80+
// that the pivot is always drawn in the middle.
8281
x = applyRange(
8382
scale.copy(),
8483
quantize(
8584
interpolateNumber(marginLeft, width - marginRight),
86-
Math.min(
87-
domain.length + (pivot !== undefined) + 2 * (type === "threshold"),
88-
range === undefined ? Infinity : range.length + +(type === "threshold")
89-
)
85+
Math.min(domain.length + (pivot !== undefined), range === undefined ? Infinity : range.length)
9086
)
9187
);
9288

0 commit comments

Comments
 (0)