@ -129,21 +129,20 @@ TimeAxis.prototype.destroy = function() {
* @ return { boolean } Returns true if the component is resized
* @ return { boolean } Returns true if the component is resized
* /
* /
TimeAxis . prototype . redraw = function ( ) {
TimeAxis . prototype . redraw = function ( ) {
var options = this . options ;
var props = this . props ;
var props = this . props ;
var foreground = this . dom . foreground ;
var foreground = this . dom . foreground ;
var background = this . dom . background ;
var background = this . dom . background ;
// determine the correct parent DOM element (depending on option orientation)
// determine the correct parent DOM element (depending on option orientation)
var parent = ( options . orientation . axis == 'top' ) ? this . body . dom . top : this . body . dom . bottom ;
var parent = ( this . options . orientation . axis == 'top' ) ? this . body . dom . top : this . body . dom . bottom ;
var parentChanged = ( foreground . parentNode !== parent ) ;
var parentChanged = ( foreground . parentNode !== parent ) ;
// calculate character width and height
// calculate character width and height
this . _calculateCharSize ( ) ;
this . _calculateCharSize ( ) ;
// TODO: recalculate sizes only needed when parent is resized or options is changed
// TODO: recalculate sizes only needed when parent is resized or options is changed
var showMinorLabels = this . options . showMinorLabels ;
var showMajorLabels = this . options . showMajorLabels ;
var showMinorLabels = this . options . showMinorLabels && this . options . orientation . axis !== 'none' ;
var showMajorLabels = this . options . showMajorLabels && this . options . orientation . axis !== 'none' ;
// determine the width and height of the elemens for the axis
// determine the width and height of the elemens for the axis
props . minorLabelHeight = showMinorLabels ? props . minorCharHeight : 0 ;
props . minorLabelHeight = showMinorLabels ? props . minorCharHeight : 0 ;
@ -152,7 +151,7 @@ TimeAxis.prototype.redraw = function () {
props . width = foreground . offsetWidth ;
props . width = foreground . offsetWidth ;
props . minorLineHeight = this . body . domProps . root . height - props . majorLabelHeight -
props . minorLineHeight = this . body . domProps . root . height - props . majorLabelHeight -
( options . orientation . axis == 'top' ? this . body . domProps . bottom . height : this . body . domProps . top . height ) ;
( this . options . orientation . axis == 'top' ? this . body . domProps . bottom . height : this . body . domProps . top . height ) ;
props . minorLineWidth = 1 ; // TODO: really calculate width
props . minorLineWidth = 1 ; // TODO: really calculate width
props . majorLineHeight = props . minorLineHeight + props . majorLabelHeight ;
props . majorLineHeight = props . minorLineHeight + props . majorLabelHeight ;
props . majorLineWidth = 1 ; // TODO: really calculate width
props . majorLineWidth = 1 ; // TODO: really calculate width