|
@ -223,6 +223,7 @@ TimeAxis.prototype._repaintLabels = function () { |
|
|
var xPrev = 0; |
|
|
var xPrev = 0; |
|
|
var width = 0; |
|
|
var width = 0; |
|
|
var prevLine; |
|
|
var prevLine; |
|
|
|
|
|
var prevText; |
|
|
var xFirstMajorLabel = undefined; |
|
|
var xFirstMajorLabel = undefined; |
|
|
var max = 0; |
|
|
var max = 0; |
|
|
var className; |
|
|
var className; |
|
@ -241,9 +242,12 @@ TimeAxis.prototype._repaintLabels = function () { |
|
|
if (prevLine) { |
|
|
if (prevLine) { |
|
|
prevLine.style.width = width + 'px'; |
|
|
prevLine.style.width = width + 'px'; |
|
|
} |
|
|
} |
|
|
|
|
|
if (prevText) { |
|
|
|
|
|
prevText.style.width = width + 'px'; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if (this.options.showMinorLabels) { |
|
|
if (this.options.showMinorLabels) { |
|
|
this._repaintMinorText(x, step.getLabelMinor(), orientation, className); |
|
|
|
|
|
|
|
|
prevText = this._repaintMinorText(x, step.getLabelMinor(), orientation, className); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (isMajor && this.options.showMajorLabels) { |
|
|
if (isMajor && this.options.showMajorLabels) { |
|
@ -290,6 +294,7 @@ TimeAxis.prototype._repaintLabels = function () { |
|
|
* @param {String} text |
|
|
* @param {String} text |
|
|
* @param {String} orientation "top" or "bottom" (default) |
|
|
* @param {String} orientation "top" or "bottom" (default) |
|
|
* @param {String} className |
|
|
* @param {String} className |
|
|
|
|
|
* @return {Element} Returns the HTML element of the created label |
|
|
* @private |
|
|
* @private |
|
|
*/ |
|
|
*/ |
|
|
TimeAxis.prototype._repaintMinorText = function (x, text, orientation, className) { |
|
|
TimeAxis.prototype._repaintMinorText = function (x, text, orientation, className) { |
|
@ -311,6 +316,8 @@ TimeAxis.prototype._repaintMinorText = function (x, text, orientation, className |
|
|
label.style.left = x + 'px'; |
|
|
label.style.left = x + 'px'; |
|
|
label.className = 'vis-text vis-minor ' + className; |
|
|
label.className = 'vis-text vis-minor ' + className; |
|
|
//label.title = title; // TODO: this is a heavy operation
|
|
|
//label.title = title; // TODO: this is a heavy operation
|
|
|
|
|
|
|
|
|
|
|
|
return label; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
@ -319,6 +326,7 @@ TimeAxis.prototype._repaintMinorText = function (x, text, orientation, className |
|
|
* @param {String} text |
|
|
* @param {String} text |
|
|
* @param {String} orientation "top" or "bottom" (default) |
|
|
* @param {String} orientation "top" or "bottom" (default) |
|
|
* @param {String} className |
|
|
* @param {String} className |
|
|
|
|
|
* @return {Element} Returns the HTML element of the created label |
|
|
* @private |
|
|
* @private |
|
|
*/ |
|
|
*/ |
|
|
TimeAxis.prototype._repaintMajorText = function (x, text, orientation, className) { |
|
|
TimeAxis.prototype._repaintMajorText = function (x, text, orientation, className) { |
|
@ -340,6 +348,8 @@ TimeAxis.prototype._repaintMajorText = function (x, text, orientation, className |
|
|
|
|
|
|
|
|
label.style.top = (orientation == 'top') ? '0' : (this.props.minorLabelHeight + 'px'); |
|
|
label.style.top = (orientation == 'top') ? '0' : (this.props.minorLabelHeight + 'px'); |
|
|
label.style.left = x + 'px'; |
|
|
label.style.left = x + 'px'; |
|
|
|
|
|
|
|
|
|
|
|
return label; |
|
|
}; |
|
|
}; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|