|
|
@ -81,7 +81,7 @@ BackgroundItem.prototype.redraw = function() { |
|
|
|
if (!dom.box.parentNode) { |
|
|
|
var background = this.parent.dom.background; |
|
|
|
if (!background) { |
|
|
|
throw new Error('Cannot redraw time axis: parent has no background container element'); |
|
|
|
throw new Error('Cannot redraw item: parent has no background container element'); |
|
|
|
} |
|
|
|
background.appendChild(dom.box); |
|
|
|
} |
|
|
@ -138,6 +138,12 @@ BackgroundItem.prototype.repositionY = function() { |
|
|
|
var onTop = this.options.orientation === 'top'; |
|
|
|
this.dom.content.style.top = onTop ? '' : '0'; |
|
|
|
this.dom.content.style.bottom = onTop ? '0' : ''; |
|
|
|
|
|
|
|
var height = Math.max(this.parent.height, |
|
|
|
this.parent.itemSet.body.domProps.centerContainer.height); |
|
|
|
this.dom.box.style.top = onTop ? '0' : ''; |
|
|
|
this.dom.box.style.bottom = onTop ? '' : '0'; |
|
|
|
this.dom.box.style.height = height + 'px'; |
|
|
|
}; |
|
|
|
|
|
|
|
module.exports = BackgroundItem; |