From abefb67131b9e71add0ac79d857c6acc9e87ce50 Mon Sep 17 00:00:00 2001 From: jos Date: Thu, 5 Jun 2014 17:00:29 +0200 Subject: [PATCH] Moved CurrentTime and CustomTime to the foreground panel --- src/timeline/component/CurrentTime.js | 7 +++---- src/timeline/component/CustomTime.js | 7 +++---- src/timeline/component/css/currenttime.css | 1 - src/timeline/component/css/customtime.css | 1 - 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/timeline/component/CurrentTime.js b/src/timeline/component/CurrentTime.js index 5260b298..25210ee1 100644 --- a/src/timeline/component/CurrentTime.js +++ b/src/timeline/component/CurrentTime.js @@ -36,15 +36,14 @@ CurrentTime.prototype._create = function _create () { * @return {boolean} Returns true if the component is resized */ CurrentTime.prototype.repaint = function repaint() { - // FIXME: CurrentTime should be on the foreground - if (this.options.showCurrentTime) { - if (this.bar.parentNode != this.timeline.dom.backgroundVertical) { + var parent = this.timeline.dom.foregroundVertical; + if (this.bar.parentNode != parent) { // attach to the dom if (this.bar.parentNode) { this.bar.parentNode.removeChild(this.bar); } - this.timeline.dom.backgroundVertical.appendChild(this.bar); + parent.appendChild(this.bar); this.start(); } diff --git a/src/timeline/component/CustomTime.js b/src/timeline/component/CustomTime.js index fdd81d1b..2012bcf9 100644 --- a/src/timeline/component/CustomTime.js +++ b/src/timeline/component/CustomTime.js @@ -54,15 +54,14 @@ CustomTime.prototype._create = function _create () { * @return {boolean} Returns true if the component is resized */ CustomTime.prototype.repaint = function () { - // FIXME: CustomTime should be on the foreground - if (this.options.showCustomTime) { - if (this.bar.parentNode != this.timeline.dom.backgroundVertical) { + var parent = this.timeline.dom.foregroundVertical; + if (this.bar.parentNode != parent) { // attach to the dom if (this.bar.parentNode) { this.bar.parentNode.removeChild(this.bar); } - this.timeline.dom.backgroundVertical.appendChild(this.bar); + parent.appendChild(this.bar); } var x = this.options.toScreen(this.customTime); diff --git a/src/timeline/component/css/currenttime.css b/src/timeline/component/css/currenttime.css index 73438693..20164cd8 100644 --- a/src/timeline/component/css/currenttime.css +++ b/src/timeline/component/css/currenttime.css @@ -1,5 +1,4 @@ .vis.timeline .currenttime { background-color: #FF7F6E; width: 2px; - z-index: 9; } \ No newline at end of file diff --git a/src/timeline/component/css/customtime.css b/src/timeline/component/css/customtime.css index 76ce38fe..f5832e4b 100644 --- a/src/timeline/component/css/customtime.css +++ b/src/timeline/component/css/customtime.css @@ -2,5 +2,4 @@ background-color: #6E94FF; width: 2px; cursor: move; - z-index: 9; } \ No newline at end of file