From 9be633069893c32c1cdabf16782ea81388d5f1da Mon Sep 17 00:00:00 2001 From: yotamberk Date: Fri, 23 Dec 2016 12:47:32 +0200 Subject: [PATCH 1/2] Remove dist folder (#2497) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 34d37f8f..ae2f8dd4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ # vis.js files test/ +dist/ # npm files node_modules From 9f0376ea446afb9974cf707ef19ec3732acff4ca Mon Sep 17 00:00:00 2001 From: yotamberk Date: Fri, 23 Dec 2016 13:04:57 +0200 Subject: [PATCH 2/2] add template support for minor/major labels (#2493) * Fix redraw order * Fix error when option is not defined * Allow template labels --- lib/timeline/component/TimeAxis.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/timeline/component/TimeAxis.js b/lib/timeline/component/TimeAxis.js index d8043521..30f1903b 100644 --- a/lib/timeline/component/TimeAxis.js +++ b/lib/timeline/component/TimeAxis.js @@ -332,8 +332,7 @@ TimeAxis.prototype._repaintMinorText = function (x, text, orientation, className this.dom.foreground.appendChild(label); } this.dom.minorTexts.push(label); - - label.childNodes[0].nodeValue = text; + label.innerHTML = text; label.style.top = (orientation == 'top') ? (this.props.majorLabelHeight + 'px') : '0'; @@ -364,7 +363,8 @@ TimeAxis.prototype._repaintMajorText = function (x, text, orientation, className if (!label) { // create label - var content = document.createTextNode(text); + var content = document.createElement('div'); + content.innerHTML = text; label = document.createElement('div'); label.appendChild(content); this.dom.foreground.appendChild(label);