mirror of https://github.com/vector-im/riot-web
Merge pull request #214 from matrix-org/rav/gemini-resize
Use our fork of react-gemini-scrollbar to fix resize issuespull/21833/head
commit
8a4a810d1f
|
@ -33,7 +33,7 @@
|
|||
"q": "^1.4.1",
|
||||
"react": "^0.14.2",
|
||||
"react-dom": "^0.14.2",
|
||||
"react-gemini-scrollbar": "^2.0.1",
|
||||
"react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#d9a808d",
|
||||
"sanitize-html": "^1.11.1",
|
||||
"velocity-animate": "^1.2.3",
|
||||
"velocity-ui-pack": "^1.2.2"
|
||||
|
|
|
@ -163,17 +163,6 @@ module.exports = React.createClass({
|
|||
}
|
||||
},
|
||||
|
||||
// makes the MessagePanel update itself after it is resized (due to other
|
||||
// changes in the DOM)
|
||||
onResize: function() {
|
||||
if (!this.refs.scrollPanel) { return; }
|
||||
|
||||
// we don't need to forceUpdate ourselves here, but we do need to
|
||||
// forceUpdate the scrollpanel, which will make the gemini panel update
|
||||
// itself and trigger a scroll position check.
|
||||
this.refs.scrollPanel.forceUpdate();
|
||||
},
|
||||
|
||||
_getEventTiles: function() {
|
||||
var EventTile = sdk.getComponent('rooms.EventTile');
|
||||
|
||||
|
|
|
@ -1042,13 +1042,7 @@ module.exports = React.createClass({
|
|||
},
|
||||
|
||||
onChildResize: function() {
|
||||
// When the video, status bar, or the message composer resizes, the
|
||||
// scroll panel also changes size. Work around GeminiScrollBar fail by
|
||||
// telling it about it. This also ensures that the scroll offset is
|
||||
// updated.
|
||||
if (this.refs.messagePanel) {
|
||||
this.refs.messagePanel.onResize();
|
||||
}
|
||||
// no longer anything to do here
|
||||
},
|
||||
|
||||
showSettings: function(show) {
|
||||
|
|
|
@ -510,13 +510,6 @@ var TimelinePanel = React.createClass({
|
|||
return null;
|
||||
},
|
||||
|
||||
// makes the TimelinePanel update itself after it is resized (due to other
|
||||
// changes in the DOM)
|
||||
onResize: function() {
|
||||
if (!this.refs.messagePanel) { return; }
|
||||
this.refs.messagePanel.onResize();
|
||||
},
|
||||
|
||||
_initTimeline: function(props) {
|
||||
var initialEvent = props.eventId;
|
||||
var pixelOffset = props.eventPixelOffset;
|
||||
|
|
Loading…
Reference in New Issue