Browse Source

Moved CurrentTime and CustomTime to the foreground panel

css_transitions
jos 10 years ago
parent
commit
abefb67131
4 changed files with 6 additions and 10 deletions
  1. +3
    -4
      src/timeline/component/CurrentTime.js
  2. +3
    -4
      src/timeline/component/CustomTime.js
  3. +0
    -1
      src/timeline/component/css/currenttime.css
  4. +0
    -1
      src/timeline/component/css/customtime.css

+ 3
- 4
src/timeline/component/CurrentTime.js View File

@ -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();
}

+ 3
- 4
src/timeline/component/CustomTime.js View File

@ -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);

+ 0
- 1
src/timeline/component/css/currenttime.css View File

@ -1,5 +1,4 @@
.vis.timeline .currenttime {
background-color: #FF7F6E;
width: 2px;
z-index: 9;
}

+ 0
- 1
src/timeline/component/css/customtime.css View File

@ -2,5 +2,4 @@
background-color: #6E94FF;
width: 2px;
cursor: move;
z-index: 9;
}

Loading…
Cancel
Save