From d714291aa139b5a7b65edd3d1615f19a8027ac0f Mon Sep 17 00:00:00 2001 From: David Baker Date: Fri, 8 Sep 2017 13:27:14 +0100 Subject: [PATCH] Re-add doc on scroll state map structure --- src/stores/RoomScrollStateStore.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/stores/RoomScrollStateStore.js b/src/stores/RoomScrollStateStore.js index a1d46a29b8..07848283d1 100644 --- a/src/stores/RoomScrollStateStore.js +++ b/src/stores/RoomScrollStateStore.js @@ -19,6 +19,19 @@ limitations under the License. */ class RoomScrollStateStore { constructor() { + // A map from room id to scroll state. + // + // If there is no special scroll state (ie, we are following the live + // timeline), the scroll state is null. Otherwise, it is an object with + // the following properties: + // + // focussedEvent: the ID of the 'focussed' event. Typically this is + // the last event fully visible in the viewport, though if we + // have done an explicit scroll to an explicit event, it will be + // that event. + // + // pixelOffset: the number of pixels the window is scrolled down + // from the focussedEvent. this._scrollStateMap = {}; }