Browse Source

Added floating-point compensation to range-item width calculation (#2107)

* fixes #2092
codeClimate
Iskander508 8 years ago
committed by Alexander Wunschik
parent
commit
d9576bee50
1 changed files with 3 additions and 1 deletions
  1. +3
    -1
      lib/timeline/component/item/RangeItem.js

+ 3
- 1
lib/timeline/component/item/RangeItem.js View File

@ -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) {

Loading…
Cancel
Save