From 2b94b7101f2f5d9700a499975bd4978b284b0689 Mon Sep 17 00:00:00 2001 From: ljungster Date: Thu, 28 Apr 2022 17:16:15 -0400 Subject: fixed disappearing nodes --- src/client/views/collections/CollectionNoteTakingView.tsx | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src') 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 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) { -- cgit v1.2.3-70-g09d2