aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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) {