aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionStackingView.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-08-29 13:49:45 -0400
committerbob <bcz@cs.brown.edu>2019-08-29 13:49:45 -0400
commite2317289507fd6d20096dc1d2abd5ab1d815e895 (patch)
tree1a4a98af879b3dc66b5844deec2d9c8917c2fe97 /src/client/views/collections/CollectionStackingView.tsx
parent0b43aead85c0de5877c0ecea7703acb6f2539249 (diff)
parent22a5999626b11cf75cafbcd421601e668438f6ad (diff)
Merge branch 'master' into monika_linking
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);