aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorljungster <parkerljung@gmail.com>2022-04-28 17:16:15 -0400
committerljungster <parkerljung@gmail.com>2022-04-28 17:16:15 -0400
commit2b94b7101f2f5d9700a499975bd4978b284b0689 (patch)
tree744fa7a1a3125b06385e0b4997add9ada0c24a40 /src
parentf5216c401dcf1c27719fa8d43b3c0319afa7bc4b (diff)
fixed disappearing nodes
Diffstat (limited to 'src')
-rw-r--r--src/client/views/collections/CollectionNoteTakingView.tsx12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionNoteTakingView.tsx b/src/client/views/collections/CollectionNoteTakingView.tsx
index 3fc896e0a..4e2bdbfa5 100644
--- a/src/client/views/collections/CollectionNoteTakingView.tsx
+++ b/src/client/views/collections/CollectionNoteTakingView.tsx
@@ -304,14 +304,12 @@ export class CollectionNoteTakingView extends CollectionSubView<Partial<collecti
const castedSectionValue = heading.toString()
const existingHeader = this.columnHeaders.find(sh => sh.heading === (castedSectionValue));
const colStartXCoords = this.columnStartXCoords
- if (existingHeader) {
- const index = this.columnHeaders.indexOf(existingHeader)
- if (this.columnHeaders.length == 1) {
- return this.props.PanelWidth() - colStartXCoords[index] - 4 * this.gridGap - 20
- }
- return colStartXCoords[index + 1] - colStartXCoords[index] - 2 * this.gridGap - 20
+ if (!existingHeader) {
+ return 1000
}
- return 1000;
+ const index = this.columnHeaders.indexOf(existingHeader)
+ const endColValue = index == this.columnHeaders.length - 1 ? this.PanelWidth : this.columnStartXCoords[index+1]
+ return endColValue - colStartXCoords[index] - 3 * this.xMargin
}
getDocHeight(d?: Doc) {