@ -60,10 +60,15 @@ RangeItem.prototype.redraw = function() {
dom . box = document . createElement ( 'div' ) ;
// className is updated in redraw()
// frame box (to prevent the item contents from overflowing
dom . frame = document . createElement ( 'div' ) ;
dom . frame . className = 'vis-item-frame' ;
dom . box . appendChild ( dom . frame ) ;
// contents box
dom . content = document . createElement ( 'div' ) ;
dom . content . className = 'vis-item-content' ;
dom . box . appendChild ( dom . content ) ;
dom . frame . appendChild ( dom . content ) ;
// attach this item as attribute
dom . box [ 'timeline-item' ] = this ;
@ -100,7 +105,7 @@ RangeItem.prototype.redraw = function() {
dom . box . className = this . baseClassName + className ;
// determine from css whether this box has overflow
this . overflow = window . getComputedStyle ( dom . content ) . overflow !== 'hidden' ;
this . overflow = window . getComputedStyle ( dom . frame ) . overflow !== 'hidden' ;
// recalculate size
// turn off max-width to be able to calculate the real width