diff options
| author | bob <bcz@cs.brown.edu> | 2019-08-27 12:03:16 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-08-27 12:03:16 -0400 |
| commit | 8b210d872e3a9c540825be0e9fbb912514092def (patch) | |
| tree | bb07da8cf29483a746f8dc84e9607ce9c702d9e9 /src/client/views/collections/CollectionStackingView.tsx | |
| parent | 2b1035aa307a0cea6076030822cd5bb3c9793fb4 (diff) | |
fixes for doc decorations with resizing textboxes.
Diffstat (limited to 'src/client/views/collections/CollectionStackingView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionStackingView.tsx | 3 |
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); |
