docs: add comment about topSoFar
This commit is contained in:
parent
b84f2eb106
commit
0fa9608587
1 changed files with 5 additions and 3 deletions
|
@ -131,7 +131,9 @@ export const calculateSequenceEditorTree = (
|
|||
}
|
||||
arrayOfChildren.push(row)
|
||||
nSoFar += 1
|
||||
topSoFar += HEIGHT_OF_ANY_TITLE
|
||||
// As we add rows to the tree, top to bottom, we accumulate the pixel
|
||||
// distance to the top of the tree from the bottom of the current row:
|
||||
topSoFar += row.nodeHeight
|
||||
if (!isCollapsed) {
|
||||
addProps(
|
||||
sheetObject,
|
||||
|
@ -235,7 +237,7 @@ export const calculateSequenceEditorTree = (
|
|||
n: nSoFar,
|
||||
}
|
||||
arrayOfChildren.push(row)
|
||||
topSoFar += HEIGHT_OF_ANY_TITLE
|
||||
topSoFar += row.nodeHeight
|
||||
if (!isCollapsed) {
|
||||
nSoFar += 1
|
||||
|
||||
|
@ -275,7 +277,7 @@ export const calculateSequenceEditorTree = (
|
|||
}
|
||||
arrayOfChildren.push(row)
|
||||
nSoFar += 1
|
||||
topSoFar += HEIGHT_OF_ANY_TITLE
|
||||
topSoFar += row.nodeHeight
|
||||
}
|
||||
|
||||
return tree
|
||||
|
|
Loading…
Reference in a new issue