diff options
author | bob <bcz@cs.brown.edu> | 2020-01-29 13:54:27 -0500 |
---|---|---|
committer | bob <bcz@cs.brown.edu> | 2020-01-29 13:54:27 -0500 |
commit | ac9492714eb9264b67d8033d8753fc6ed51b4e29 (patch) | |
tree | a6b9c97a46451040904ad75ccde33ccceb2f0623 /src/client/views/nodes/CollectionFreeFormDocumentView.tsx | |
parent | 1801e65b9fb84070a65e74766782099e1fb6832b (diff) |
ui cleanup for pivot viewer/chrome. error fixes. fixed layout of flyouts
Diffstat (limited to 'src/client/views/nodes/CollectionFreeFormDocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/CollectionFreeFormDocumentView.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx index 3244b7d3e..2183129cf 100644 --- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx +++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx @@ -60,8 +60,8 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF componentWillUnmount() { this._disposer?.(); } componentDidMount() { - this._disposer = reaction(() => Array.from(Cast(this.props.Document?.animateToPos, listSpec("number"), null)), - target => this._animPos = !target ? undefined : target[2] ? [NumCast(this.layoutDoc.x), NumCast(this.layoutDoc.y)] : + this._disposer = reaction(() => Array.from(Cast(this.props.Document?.animateToPos, listSpec("number"), null) || []), + target => this._animPos = !target || !target?.length ? undefined : target[2] ? [NumCast(this.layoutDoc.x), NumCast(this.layoutDoc.y)] : this.props.ScreenToLocalTransform().transformPoint(target[0], target[1]), { fireImmediately: true }); } |