Browse Source

Few fixes to get animation better (still not there)

css_transitions
jos 10 years ago
parent
commit
cd62233c60
2 changed files with 10 additions and 7 deletions
  1. +7
    -6
      src/timeline/component/css/animation.css
  2. +3
    -1
      src/timeline/component/item/ItemBox.js

+ 7
- 6
src/timeline/component/css/animation.css View File

@ -1,24 +1,25 @@
/* TODO: get animation working nicely
.vis.timeline.root {
/*
-webkit-transition: height .4s ease-in-out;
transition: height .4s ease-in-out;
*/
}
.vis.timeline .vispanel {
/*
-webkit-transition: height .4s ease-in-out, top .4s ease-in-out;
transition: height .4s ease-in-out, top .4s ease-in-out;
*/
}
.vis.timeline .axis {
/*
-webkit-transition: top .4s ease-in-out;
transition: top .4s ease-in-out;
*/
}
.vis.timeline .group,
.vis.timeline .labelset .vlabel {
-webkit-transition: height .4s ease-in-out;
transition: height .4s ease-in-out;
}
/* TODO: get animation working nicely
.vis.timeline .item {
-webkit-transition: top .4s ease-in-out;

+ 3
- 1
src/timeline/component/item/ItemBox.js View File

@ -212,8 +212,10 @@ ItemBox.prototype.repositionY = function() {
if (orientation == 'top') {
box.style.top = (this.top || 0) + 'px';
line.style.top = '0';
line.style.height = (this.parent.top + this.top + 1) + 'px';
line.style.bottom = '';
}
else { // orientation 'bottom'
var itemSetHeight = this.parent.itemSet.props.height; // TODO: this is nasty
@ -221,7 +223,7 @@ ItemBox.prototype.repositionY = function() {
box.style.top = (this.parent.height - this.top - this.height || 0) + 'px';
line.style.top = (itemSetHeight - lineHeight) + 'px';
line.style.height = (lineHeight) + 'px';
line.style.bottom = '0';
}
dot.style.top = (-this.props.dot.height / 2) + 'px';

Loading…
Cancel
Save