From 223956a206f217e4d6ed5e2abfb1b0558b336414 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 3 Mar 2020 15:42:44 +0100 Subject: [PATCH] add comment how offset from bottom is calculated --- src/components/structures/ScrollPanel.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/structures/ScrollPanel.js b/src/components/structures/ScrollPanel.js index 72d5330451..548dd70748 100644 --- a/src/components/structures/ScrollPanel.js +++ b/src/components/structures/ScrollPanel.js @@ -765,6 +765,7 @@ export default createReactClass({ }, _topFromBottom(node) { + // current capped height - distance from top = distance from bottom of container to top of tracked element return this._itemlist.current.clientHeight - node.offsetTop; },