Skip to content

Commit

Permalink
Improved fixed for #2145 for big values, no need to floor
Browse files Browse the repository at this point in the history
  • Loading branch information
Çağatay Çivici committed Oct 4, 2017
1 parent 4389e8f commit 4f21128
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/app/components/slider/slider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,9 @@ export class Slider implements OnDestroy,ControlValueAccessor {

calculateHandleValue(event): number {
if(this.orientation === 'horizontal')
return Math.floor(((event.pageX - this.initX) * 100) / (this.barWidth));
return ((event.pageX - this.initX) * 100) / (this.barWidth);
else
return Math.floor((((this.initY + this.barHeight) - event.pageY) * 100) / (this.barHeight));
return(((this.initY + this.barHeight) - event.pageY) * 100) / (this.barHeight);
}

updateHandleValue(): void {
Expand Down

0 comments on commit 4f21128

Please sign in to comment.