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:
Коммит
f15c54e600
|
@ -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() {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче