From c30ff57c6288a0251b63207f49500c6b68522b70 Mon Sep 17 00:00:00 2001 From: wmwragg Date: Tue, 30 Aug 2016 12:29:25 +0100 Subject: [PATCH] Better comments --- src/components/views/rooms/RoomList.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index 09d430de5e..8bde9f2ace 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -64,12 +64,12 @@ module.exports = React.createClass({ componentDidMount: function() { this.dispatcherRef = dis.register(this.onAction); - // Initilaise the stickyHeaders when the component is created + // Initialise the stickyHeaders when the component is created this._updateStickyHeaders(true); }, componentDidUpdate: function() { - // Reinitilaise the stickyHeaders when the component is updated + // Reinitialise the stickyHeaders when the component is updated this._updateStickyHeaders(true); }, @@ -322,7 +322,7 @@ module.exports = React.createClass({ } }, - // Doing the stckiy headers as raw DOM, for speed, as it gets very stuttery if done + // Doing the sticky headers as raw DOM, for speed, as it gets very stuttery if done // properly through React _initAndPositionStickyHeaders: function(initialise, scrollToPosition) { var scrollArea = this._getScrollNode(); @@ -337,7 +337,7 @@ module.exports = React.createClass({ // Get a collection of sticky header containers references this.stickies = document.getElementsByClassName("mx_RoomSubList_labelContainer"); - // Make sure there is sufficient space to do sticky headers + // Make sure there is sufficient space to do sticky headers: 120px plus all the sticky headers this.scrollAreaSufficient = (120 + (this.stickies[0].getBoundingClientRect().height * this.stickies.length)) < scrollAreaHeight; // Initialise the sticky headers