aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionStackingView.tsx
diff options
context:
space:
mode:
authorkimdahey <claire_kim1@brown.edu>2019-08-29 14:32:53 -0400
committerkimdahey <claire_kim1@brown.edu>2019-08-29 14:32:53 -0400
commit8e2e2c1126086cbc87432bb0466205f892d8ae98 (patch)
treed28a6721bcc392906a0ebd091c4acd11ff4747c0 /src/client/views/collections/CollectionStackingView.tsx
parent116c17c1e4ccf189d770d170d07a6bfbf95ca4e1 (diff)
parent22a5999626b11cf75cafbcd421601e668438f6ad (diff)
fix merge conflicts
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
-rw-r--r--src/client/views/collections/CollectionStackingView.tsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionStackingView.tsx b/src/client/views/collections/CollectionStackingView.tsx
index 6f22f2d2a..97b31bf2a 100644
--- a/src/client/views/collections/CollectionStackingView.tsx
+++ b/src/client/views/collections/CollectionStackingView.tsx
@@ -278,7 +278,8 @@ export class CollectionStackingView extends CollectionSubView(doc => doc) {
}
getDocTransform(doc: Doc, dref: HTMLDivElement) {
- let y = this._scroll;
+ if (!dref) return Transform.Identity();
+ let y = this._scroll; // required for document decorations to update when the text box container is scrolled
let { scale, translateX, translateY } = Utils.GetScreenTransform(dref);
let outerXf = Utils.GetScreenTransform(this._masonryGridRef!);
let offset = this.props.ScreenToLocalTransform().transformDirection(outerXf.translateX - translateX, outerXf.translateY - translateY);