diff --git a/HISTORY.md b/HISTORY.md index d5435c42..c18909a4 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -4,9 +4,13 @@ http://visjs.org ## not yet released, version 1.0.1 +### Timeline + +- Fixed width of items with type `rangeoverflow`. + ### Graph -- added coordinate conversion from DOM to Canvas. +- Added coordinate conversion from DOM to Canvas. ## 2014-05-02, version 1.0.0 diff --git a/src/timeline/component/item/ItemRangeOverflow.js b/src/timeline/component/item/ItemRangeOverflow.js index 156123f6..6ff4a44f 100644 --- a/src/timeline/component/item/ItemRangeOverflow.js +++ b/src/timeline/component/item/ItemRangeOverflow.js @@ -46,9 +46,10 @@ ItemRangeOverflow.prototype.repositionX = function repositionX() { this.left = start; var boxWidth = Math.max(end - start, 1); - this.width = (this.props.content.width < boxWidth) ? - boxWidth : - start + contentLeft + this.props.content.width; + this.width = boxWidth + this.props.content.width; + // Note: The calculation of width is an optimistic calculation, giving + // a width which will not change when moving the Timeline + // So no restacking needed, which is nicer for the eye this.dom.box.style.left = this.left + 'px'; this.dom.box.style.width = boxWidth + 'px';