From 5b7f264054eb36b8a4f23110000935ee793cc073 Mon Sep 17 00:00:00 2001 From: jos Date: Wed, 6 May 2015 14:19:25 +0200 Subject: [PATCH] Fixed consistently falling back to "bottom" orientation in case of invalid values --- lib/timeline/Core.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/timeline/Core.js b/lib/timeline/Core.js index 735b4770..906b829d 100644 --- a/lib/timeline/Core.js +++ b/lib/timeline/Core.js @@ -688,7 +688,7 @@ Core.prototype._redraw = function() { // reposition the scrollable contents var offset = this.props.scrollTop; - if (options.orientation.item == 'bottom') { + if (options.orientation.item != 'top') { offset += Math.max(this.props.centerContainer.height - this.props.center.height - this.props.border.top - this.props.border.bottom, 0); } @@ -944,7 +944,7 @@ Core.prototype._updateScrollTop = function () { if (scrollTopMin != this.props.scrollTopMin) { // in case of bottom orientation, change the scrollTop such that the contents // do not move relative to the time axis at the bottom - if (this.options.orientation.item == 'bottom') { + if (this.options.orientation.item != 'top') { this.props.scrollTop += (scrollTopMin - this.props.scrollTopMin); } this.props.scrollTopMin = scrollTopMin;