Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Commit

Permalink
Added floating-point compensation to range-item width calculation (#2107
Browse files Browse the repository at this point in the history
)

* fixes #2092
  • Loading branch information
Iskander508 authored and mojoaxel committed Sep 20, 2016
1 parent 6539ca7 commit d9576be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/timeline/component/item/RangeItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,9 @@ RangeItem.prototype.repositionX = function(limitSize) {
end = 2 * parentWidth;
}
}
var boxWidth = Math.max(end - start, 1);

// add 0.5 to compensate floating-point values rounding
var boxWidth = Math.max(end - start + 0.5, 1);

if (this.overflow) {
if (this.options.rtl) {
Expand Down

0 comments on commit d9576be

Please sign in to comment.