Skip to content

Commit

Permalink
fix(range): knob B can only be actived if range is dual
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Mar 8, 2017
1 parent b541832 commit d538245
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/range/range.ts
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@ export class Range extends Ion implements AfterViewInit, ControlValueAccessor, O

// figure out which knob they started closer to
const ratio = clamp(0, (current.x - rect.left) / (rect.width), 1);
this._activeB = (Math.abs(ratio - this._ratioA) > Math.abs(ratio - this._ratioB));
this._activeB = this._dual && (Math.abs(ratio - this._ratioA) > Math.abs(ratio - this._ratioB));

// update the active knob's position
this._update(current, rect, true);
Expand Down

0 comments on commit d538245

Please sign in to comment.