|
@ -448,6 +448,10 @@ Timeline.prototype.focus = function(id, options) { |
|
|
var verticalAnimationFrame = function(ease, willDraw, done) { |
|
|
var verticalAnimationFrame = function(ease, willDraw, done) { |
|
|
var verticalScroll = getItemVerticalScroll(me, item); |
|
|
var verticalScroll = getItemVerticalScroll(me, item); |
|
|
|
|
|
|
|
|
|
|
|
if (verticalScroll === false) { |
|
|
|
|
|
return; // We don't need to scroll, so do nothing
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
if(!initialVerticalScroll) { |
|
|
if(!initialVerticalScroll) { |
|
|
initialVerticalScroll = verticalScroll; |
|
|
initialVerticalScroll = verticalScroll; |
|
|
} |
|
|
} |
|
@ -560,6 +564,11 @@ function getEnd(item) { |
|
|
* @return {{shouldScroll: bool, scrollOffset: number, itemTop: number}} |
|
|
* @return {{shouldScroll: bool, scrollOffset: number, itemTop: number}} |
|
|
*/ |
|
|
*/ |
|
|
function getItemVerticalScroll(timeline, item) { |
|
|
function getItemVerticalScroll(timeline, item) { |
|
|
|
|
|
if (!item.parent) { |
|
|
|
|
|
// The item no longer exists, so ignore this focus.
|
|
|
|
|
|
return false; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
var leftHeight = timeline.props.leftContainer.height; |
|
|
var leftHeight = timeline.props.leftContainer.height; |
|
|
var contentHeight = timeline.props.left.height; |
|
|
var contentHeight = timeline.props.left.height; |
|
|
|
|
|
|
|
|