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)
|
arrayOfChildren.push(row)
|
||||||
nSoFar += 1
|
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) {
|
if (!isCollapsed) {
|
||||||
addProps(
|
addProps(
|
||||||
sheetObject,
|
sheetObject,
|
||||||
|
@ -235,7 +237,7 @@ export const calculateSequenceEditorTree = (
|
||||||
n: nSoFar,
|
n: nSoFar,
|
||||||
}
|
}
|
||||||
arrayOfChildren.push(row)
|
arrayOfChildren.push(row)
|
||||||
topSoFar += HEIGHT_OF_ANY_TITLE
|
topSoFar += row.nodeHeight
|
||||||
if (!isCollapsed) {
|
if (!isCollapsed) {
|
||||||
nSoFar += 1
|
nSoFar += 1
|
||||||
|
|
||||||
|
@ -275,7 +277,7 @@ export const calculateSequenceEditorTree = (
|
||||||
}
|
}
|
||||||
arrayOfChildren.push(row)
|
arrayOfChildren.push(row)
|
||||||
nSoFar += 1
|
nSoFar += 1
|
||||||
topSoFar += HEIGHT_OF_ANY_TITLE
|
topSoFar += row.nodeHeight
|
||||||
}
|
}
|
||||||
|
|
||||||
return tree
|
return tree
|
||||||
|
|
Loading…
Reference in a new issue