mirror of
https://github.com/vector-im/hydrogen-web.git
synced 2024-12-23 11:35:04 +01:00
Improve comment
Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
parent
96e2bb0b1a
commit
9a00143623
@ -45,8 +45,10 @@ class ItemRange {
|
|||||||
|
|
||||||
normalize(idx) {
|
normalize(idx) {
|
||||||
/*
|
/*
|
||||||
Since we don't render the entire list, the index we use to do dom
|
map index from list to index in rendered range
|
||||||
manipulation or access childInstances will be different.
|
eg: if the index range of this._list is [0, 200] and we have rendered
|
||||||
|
elements in range [50, 60] then index 50 in list must map to index 0
|
||||||
|
in DOM tree/childInstance array.
|
||||||
*/
|
*/
|
||||||
return idx - this.topCount;
|
return idx - this.topCount;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user