diff --git a/lib/timeline/component/css/item.css b/lib/timeline/component/css/item.css index c69ecb0c..225daf83 100644 --- a/lib/timeline/component/css/item.css +++ b/lib/timeline/component/css/item.css @@ -87,15 +87,15 @@ .vis-item .vis-item-content { white-space: nowrap; box-sizing: border-box; - margin: 5px; + padding: 5px; } .vis-item .vis-delete { - background: url('img/timeline/delete.png') no-repeat top center; + background: url('img/timeline/delete.png') no-repeat center; position: absolute; width: 24px; height: 24px; - top: 0; + top: -4px; right: -24px; cursor: pointer; } diff --git a/lib/timeline/component/item/RangeItem.js b/lib/timeline/component/item/RangeItem.js index 4a4fc72d..53bec65c 100644 --- a/lib/timeline/component/item/RangeItem.js +++ b/lib/timeline/component/item/RangeItem.js @@ -189,6 +189,7 @@ RangeItem.prototype.repositionX = function(limitSize) { this.left = start; this.width = boxWidth; contentWidth = Math.min(end - start - 2 * this.options.padding, this.props.content.width); + // TODO: remove the need for options.padding. it's terrible. } this.dom.box.style.left = this.left + 'px'; @@ -219,9 +220,7 @@ RangeItem.prototype.repositionX = function(limitSize) { } else { if (start < 0) { - contentLeft = Math.min(-start, - (end - start - contentWidth - 2 * this.options.padding)); - // TODO: remove the need for options.padding. it's terrible. + contentLeft = -start; } else { contentLeft = 0;