diff --git a/src/timeline/component/css/animation.css b/src/timeline/component/css/animation.css index ea2b20f9..0b03f57f 100644 --- a/src/timeline/component/css/animation.css +++ b/src/timeline/component/css/animation.css @@ -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; diff --git a/src/timeline/component/item/ItemBox.js b/src/timeline/component/item/ItemBox.js index f1f30f36..6a067826 100644 --- a/src/timeline/component/item/ItemBox.js +++ b/src/timeline/component/item/ItemBox.js @@ -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';