Browse Source

Some fixes in positioning of major and minor labels/gridlines

css_transitions
josdejong 10 years ago
parent
commit
edf592c936
3 changed files with 16 additions and 12 deletions
  1. +6
    -6
      src/timeline/component/TimeAxis.js
  2. +3
    -3
      src/timeline/component/css/itemset.css
  3. +7
    -3
      src/timeline/component/css/panel.css

+ 6
- 6
src/timeline/component/TimeAxis.js View File

@ -244,12 +244,12 @@ TimeAxis.prototype._repaintMinorText = function (x, text, orientation) {
label.childNodes[0].nodeValue = text;
if (orientation == 'top') {
label.style.top = this.props.minorLabelHeight + 'px';
label.style.top = this.props.majorLabelHeight + 'px';
label.style.bottom = '';
}
else {
label.style.top = '';
label.style.bottom = this.props.minorLabelHeight + 'px';
label.style.bottom = this.props.majorLabelHeight + 'px';
}
label.style.left = x + 'px';
//label.title = title; // TODO: this is a heavy operation
@ -310,12 +310,12 @@ TimeAxis.prototype._repaintMinorLine = function (x, orientation) {
var props = this.props;
if (orientation == 'top') {
line.style.top = this.props.minorLabelHeight + 'px';
line.style.top = this.props.majorLabelHeight + 'px';
line.style.bottom = '';
}
else {
line.style.top = '';
line.style.bottom = this.props.minorLabelHeight + 'px';
line.style.bottom = this.props.majorLabelHeight + 'px';
}
line.style.height = props.minorLineHeight + 'px';
line.style.left = (x - props.minorLineWidth / 2) + 'px';
@ -387,8 +387,8 @@ TimeAxis.prototype._repaintLine = function() {
}
}
else {
if (line && line.parentElement) {
frame.removeChild(line.line);
if (line && line.parentNode) {
line.parentNode.removeChild(line);
delete this.dom.line;
}
}

+ 3
- 3
src/timeline/component/css/itemset.css View File

@ -5,9 +5,9 @@
margin: 0;
/* FIXME: get transoition working for rootpanel and itemset
-webkit-transition: height .4s ease-in-out;
transition: height .4s ease-in-out;
*/
-webkit-transition: height 4s ease-in-out;
transition: height 4s ease-in-out;
/**/
}
.vis.timeline .background {

+ 7
- 3
src/timeline/component/css/panel.css View File

@ -8,9 +8,9 @@
box-sizing: border-box;
/* FIXME: there is an issue with the height of the items when panel height is animated
-webkit-transition: height .4s ease-in-out;
transition: height .4s ease-in-out;
*/
-webkit-transition: height 4s ease-in-out;
transition: height 4s ease-in-out;
/**/
}
.vis.timeline .vpanel {
@ -19,3 +19,7 @@
-moz-box-sizing: border-box;
box-sizing: border-box;
}
.vis.timeline .vpanel {
overflow: hidden;
}

Loading…
Cancel
Save