Browse Source

Fix #2538 (#2551)

* Fix redraw order

* Fix error when option is not defined

* Allow template labels

* Fix #2538
fix2580
yotamberk 8 years ago
committed by GitHub
parent
commit
db888bd2aa
1 changed files with 2 additions and 3 deletions
  1. +2
    -3
      lib/timeline/component/TimeAxis.js

+ 2
- 3
lib/timeline/component/TimeAxis.js View File

@ -364,14 +364,12 @@ TimeAxis.prototype._repaintMajorText = function (x, text, orientation, className
if (!label) {
// create label
var content = document.createElement('div');
content.innerHTML = text;
label = document.createElement('div');
label.appendChild(content);
this.dom.foreground.appendChild(label);
}
this.dom.majorTexts.push(label);
label.childNodes[0].nodeValue = text;
label.childNodes[0].innerHTML = text;
label.className = 'vis-text vis-major ' + className;
//label.title = title; // TODO: this is a heavy operation
@ -383,6 +381,7 @@ TimeAxis.prototype._repaintMajorText = function (x, text, orientation, className
label.style.left = x + 'px';
};
this.dom.majorTexts.push(label);
return label;
};

Loading…
Cancel
Save