Merge pull request #786 from rlr/gh774/zoom-scroll-and-all-that

fix (content): #774 fix zoom, resize, high res issues
This commit is contained in:
ricky rosario 2016-06-02 15:16:17 -04:00
Родитель ccab2f2fc3 dce0f657e6
Коммит f15c54e600
1 изменённых файлов: 6 добавлений и 0 удалений

Просмотреть файл

@ -42,6 +42,9 @@ const TimelineFeed = React.createClass({
}, },
onResize: debounce(function() { onResize: debounce(function() {
this.windowHeight = window.innerHeight; this.windowHeight = window.innerHeight;
// After resizing, check if we can fit in more data.
this.onScroll();
}, 100), }, 100),
onScroll: debounce(function() { onScroll: debounce(function() {
this.handleScroll({ this.handleScroll({
@ -55,6 +58,9 @@ const TimelineFeed = React.createClass({
// position sometimes if we set scrollTop to 0 instead of 1 // position sometimes if we set scrollTop to 0 instead of 1
if (!prevProps.Feed.init && this.props.Feed.init) { if (!prevProps.Feed.init && this.props.Feed.init) {
this.refs.scrollElement.scrollTop = 1; this.refs.scrollElement.scrollTop = 1;
// Check if we can fit in more.
this.onScroll();
} }
}, },
componentDidMount() { componentDidMount() {