Browse Source

Fixed consistently falling back to "bottom" orientation in case of invalid values

flowchartTest
jos 9 years ago
parent
commit
5b7f264054
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      lib/timeline/Core.js

+ 2
- 2
lib/timeline/Core.js View File

@ -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;

Loading…
Cancel
Save