diff --git a/lib/timeline/component/item/RangeItem.js b/lib/timeline/component/item/RangeItem.js index f090f640..01c94ed2 100644 --- a/lib/timeline/component/item/RangeItem.js +++ b/lib/timeline/component/item/RangeItem.js @@ -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) {