|
@ -84,17 +84,17 @@ BoxItem.prototype.redraw = function() { |
|
|
} |
|
|
} |
|
|
if (!dom.box.parentNode) { |
|
|
if (!dom.box.parentNode) { |
|
|
var foreground = this.parent.dom.foreground; |
|
|
var foreground = this.parent.dom.foreground; |
|
|
if (!foreground) throw new Error('Cannot redraw time axis: parent has no foreground container element'); |
|
|
|
|
|
|
|
|
if (!foreground) throw new Error('Cannot redraw item: parent has no foreground container element'); |
|
|
foreground.appendChild(dom.box); |
|
|
foreground.appendChild(dom.box); |
|
|
} |
|
|
} |
|
|
if (!dom.line.parentNode) { |
|
|
if (!dom.line.parentNode) { |
|
|
var background = this.parent.dom.background; |
|
|
var background = this.parent.dom.background; |
|
|
if (!background) throw new Error('Cannot redraw time axis: parent has no background container element'); |
|
|
|
|
|
|
|
|
if (!background) throw new Error('Cannot redraw item: parent has no background container element'); |
|
|
background.appendChild(dom.line); |
|
|
background.appendChild(dom.line); |
|
|
} |
|
|
} |
|
|
if (!dom.dot.parentNode) { |
|
|
if (!dom.dot.parentNode) { |
|
|
var axis = this.parent.dom.axis; |
|
|
var axis = this.parent.dom.axis; |
|
|
if (!background) throw new Error('Cannot redraw time axis: parent has no axis container element'); |
|
|
|
|
|
|
|
|
if (!background) throw new Error('Cannot redraw item: parent has no axis container element'); |
|
|
axis.appendChild(dom.dot); |
|
|
axis.appendChild(dom.dot); |
|
|
} |
|
|
} |
|
|
this.displayed = true; |
|
|
this.displayed = true; |
|
|