|
@ -222,16 +222,14 @@ TimeAxis.prototype._repaintLabels = function () { |
|
|
dom.majorTexts = []; |
|
|
dom.majorTexts = []; |
|
|
dom.minorTexts = []; |
|
|
dom.minorTexts = []; |
|
|
|
|
|
|
|
|
var current; // eslint-disable-line no-unused-vars
|
|
|
|
|
|
|
|
|
var current; |
|
|
var next; |
|
|
var next; |
|
|
var x; |
|
|
var x; |
|
|
var xNext; |
|
|
var xNext; |
|
|
var isMajor; |
|
|
var isMajor; |
|
|
var nextIsMajor; // eslint-disable-line no-unused-vars
|
|
|
|
|
|
var showMinorGrid; |
|
|
var showMinorGrid; |
|
|
var width = 0, prevWidth; |
|
|
var width = 0, prevWidth; |
|
|
var line; |
|
|
var line; |
|
|
var labelMinor; |
|
|
|
|
|
var xFirstMajorLabel = undefined; |
|
|
var xFirstMajorLabel = undefined; |
|
|
var count = 0; |
|
|
var count = 0; |
|
|
const MAX = 1000; |
|
|
const MAX = 1000; |
|
@ -245,14 +243,12 @@ TimeAxis.prototype._repaintLabels = function () { |
|
|
|
|
|
|
|
|
isMajor = step.isMajor(); |
|
|
isMajor = step.isMajor(); |
|
|
className = step.getClassName(); |
|
|
className = step.getClassName(); |
|
|
labelMinor = step.getLabelMinor(); |
|
|
|
|
|
|
|
|
|
|
|
current = next; |
|
|
current = next; |
|
|
x = xNext; |
|
|
x = xNext; |
|
|
|
|
|
|
|
|
step.next(); |
|
|
step.next(); |
|
|
next = step.getCurrent(); |
|
|
next = step.getCurrent(); |
|
|
nextIsMajor = step.isMajor(); |
|
|
|
|
|
xNext = this.body.util.toScreen(next); |
|
|
xNext = this.body.util.toScreen(next); |
|
|
|
|
|
|
|
|
prevWidth = width; |
|
|
prevWidth = width; |
|
@ -263,7 +259,7 @@ TimeAxis.prototype._repaintLabels = function () { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (this.options.showMinorLabels && showMinorGrid) { |
|
|
if (this.options.showMinorLabels && showMinorGrid) { |
|
|
var label = this._repaintMinorText(x, labelMinor, orientation, className); |
|
|
|
|
|
|
|
|
var label = this._repaintMinorText(x, step.getLabelMinor(current), orientation, className); |
|
|
label.style.width = width + 'px'; // set width to prevent overflow
|
|
|
label.style.width = width + 'px'; // set width to prevent overflow
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -272,7 +268,7 @@ TimeAxis.prototype._repaintLabels = function () { |
|
|
if (xFirstMajorLabel == undefined) { |
|
|
if (xFirstMajorLabel == undefined) { |
|
|
xFirstMajorLabel = x; |
|
|
xFirstMajorLabel = x; |
|
|
} |
|
|
} |
|
|
label = this._repaintMajorText(x, step.getLabelMajor(), orientation, className); |
|
|
|
|
|
|
|
|
label = this._repaintMajorText(x, step.getLabelMajor(current), orientation, className); |
|
|
} |
|
|
} |
|
|
line = this._repaintMajorLine(x, width, orientation, className); |
|
|
line = this._repaintMajorLine(x, width, orientation, className); |
|
|
} |
|
|
} |
|
@ -427,7 +423,7 @@ TimeAxis.prototype._repaintMinorLine = function (x, width, orientation, classNam |
|
|
} |
|
|
} |
|
|
line.style.width = width + 'px'; |
|
|
line.style.width = width + 'px'; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return line; |
|
|
return line; |
|
|
}; |
|
|
}; |
|
|