diff options
author | bob <bcz@cs.brown.edu> | 2020-01-17 11:32:56 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2020-01-17 11:32:56 -0500 |
commit | 9af3c5967e45b98186a2862a1f23e2494630ddb3 (patch) | |
tree | c12959f9bf00a8d927373b4d345b184e8405a16f /src | |
parent | fc4dd8c7d361bc848b6b27c67d5da26b8aab408e (diff) |
fixed placement of documentdecorations for multicolumnview
Diffstat (limited to 'src')
-rw-r--r-- | src/client/views/collections/CollectionMulticolumnView.tsx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionMulticolumnView.tsx b/src/client/views/collections/CollectionMulticolumnView.tsx index 157c5e367..a04df171a 100644 --- a/src/client/views/collections/CollectionMulticolumnView.tsx +++ b/src/client/views/collections/CollectionMulticolumnView.tsx @@ -124,8 +124,10 @@ export class CollectionMulticolumnView extends CollectionSubView(MulticolumnDocu resolved.push({ pixels: width, ...remaining }); }); const collector: JSX.Element[] = []; + let offset = 0; for (let i = 0; i < resolved.length; i++) { const { target, pixels } = resolved[i]; + const shiftX = offset; collector.push( <div className={"fish"}> <ContentFittingDocumentView @@ -134,7 +136,7 @@ export class CollectionMulticolumnView extends CollectionSubView(MulticolumnDocu Document={target} DataDocument={target.resolvedDataDoc as Doc} PanelWidth={() => pixels} - getTransform={this.props.ScreenToLocalTransform} + getTransform={() => this.props.ScreenToLocalTransform().translate(-shiftX, 0)} /> <span className={"display"}>{NumCast(target.widthMagnitude).toFixed(3)} {StrCast(target.widthUnit)}</span> </div>, @@ -146,6 +148,7 @@ export class CollectionMulticolumnView extends CollectionSubView(MulticolumnDocu toRight={resolved[i + 1]?.target} /> ); + offset += pixels + resizerWidth; } collector.pop(); // removes the final extraneous resize bar return collector; |