Position read-marker 1/3 of the way down, not halfway down.

This commit is contained in:
Richard van der Hoff
2016-02-15 18:12:38 +00:00
parent 21a7d15e68
commit f992caadd7
4 changed files with 9 additions and 9 deletions
+3 -3
View File
@@ -322,13 +322,13 @@ module.exports = React.createClass({
// pixelOffset gives the number of pixels between the bottom of the node
// and the bottom of the container. If undefined, it will put the node
// in the middle of the container.
// 1/3 of the way down the container.
scrollToToken: function(scrollToken, pixelOffset) {
var scrollNode = this._getScrollNode();
// default to the middle
// default to 1/3 of the way down
if (pixelOffset === undefined) {
pixelOffset = scrollNode.clientHeight / 2;
pixelOffset = (scrollNode.clientHeight * 2)/ 3;
}
// save the desired scroll state. It's important we do this here rather