Browse Source

Fix visibility of scale lines after toggling left axis groups (#3936)

develop
kbasten 6 years ago
committed by Yotam Berkowitz
parent
commit
39ded1e88f
1 changed files with 8 additions and 4 deletions
  1. +8
    -4
      lib/timeline/component/DataAxis.js

+ 8
- 4
lib/timeline/component/DataAxis.js View File

@ -163,6 +163,8 @@ DataAxis.prototype._create = function () {
this.dom.lineContainer.style.width = '100%'; this.dom.lineContainer.style.width = '100%';
this.dom.lineContainer.style.height = this.height; this.dom.lineContainer.style.height = this.height;
this.dom.lineContainer.style.position = 'relative'; this.dom.lineContainer.style.position = 'relative';
this.dom.lineContainer.style.visibility = 'visible';
this.dom.lineContainer.style.display = 'block';
// create svg element for graph drawing. // create svg element for graph drawing.
this.svg = document.createElementNS('http://www.w3.org/2000/svg', "svg"); this.svg = document.createElementNS('http://www.w3.org/2000/svg', "svg");
@ -213,7 +215,7 @@ DataAxis.prototype._cleanupIcons = function () {
DOMutil.cleanupElements(this.svgElements); DOMutil.cleanupElements(this.svgElements);
this.iconsRemoved = true; this.iconsRemoved = true;
} }
}
};
/** /**
* Create the HTML DOM for the DataAxis * Create the HTML DOM for the DataAxis
@ -232,6 +234,7 @@ DataAxis.prototype.show = function () {
if (!this.dom.lineContainer.parentNode) { if (!this.dom.lineContainer.parentNode) {
this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer); this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer);
} }
this.dom.lineContainer.style.display = 'block';
}; };
/** /**
@ -243,9 +246,7 @@ DataAxis.prototype.hide = function () {
this.dom.frame.parentNode.removeChild(this.dom.frame); this.dom.frame.parentNode.removeChild(this.dom.frame);
} }
if (this.dom.lineContainer.parentNode) {
this.dom.lineContainer.parentNode.removeChild(this.dom.lineContainer);
}
this.dom.lineContainer.style.display = 'none';
}; };
/** /**
@ -382,6 +383,9 @@ DataAxis.prototype._redrawLabels = function () {
if (this.master === false && this.masterAxis != undefined) { if (this.master === false && this.masterAxis != undefined) {
this.scale.followScale(this.masterAxis.scale); this.scale.followScale(this.masterAxis.scale);
this.dom.lineContainer.style.display = 'none';
} else{
this.dom.lineContainer.style.display = 'block';
} }
//Is updated in side-effect of _redrawLabel(): //Is updated in side-effect of _redrawLabel():

Loading…
Cancel
Save