Skip to content

Commit

Permalink
Use full range of channel slider to decide on step size
Browse files Browse the repository at this point in the history
  • Loading branch information
will-moore committed May 3, 2024
1 parent 3855025 commit 195194c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/js/views/channel_slider_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ var ChannelSliderView = Backbone.View.extend({
var endsNotEqual = ends.reduce(allEqualFn, ends[0]) === undefined;
var min = mins.reduce(reduceFn(Math.min));
var max = maxs.reduce(reduceFn(Math.max));
if (max > SLIDER_INCR_CUTOFF) {
if (max - min > SLIDER_INCR_CUTOFF) {
// If we have a large range, use integers, otherwise format to 2dp
startAvg = parseInt(startAvg);
endAvg = parseInt(endAvg);
Expand Down Expand Up @@ -379,7 +379,7 @@ var ChannelSliderView = Backbone.View.extend({
'endsNotEqual': endsNotEqual,
'min': min,
'max': max,
'step': (max > SLIDER_INCR_CUTOFF) ? 1 : 0.01,
'step': (max - min > SLIDER_INCR_CUTOFF) ? 1 : 0.01,
'active': active,
'lutBgPos': lutBgPos,
'reverse': reverse,
Expand Down

0 comments on commit 195194c

Please sign in to comment.