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

floating-point rounding compensation to range-item width (#2092) #2107

Merged
merged 1 commit into from
Sep 20, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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