diff options
| author | bob <bcz@cs.brown.edu> | 2019-05-06 13:10:28 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-05-06 13:10:28 -0400 |
| commit | a9f465a32ac538c8dcf94bd37afda730e7be3526 (patch) | |
| tree | 48fe985b4530cd500baf707820e1de0fdae986d6 /src/client/views/nodes/DocumentView.tsx | |
| parent | f63217890738e738dfa0e8eca3f8a8996440373e (diff) | |
| parent | e96e3382104a2ae8dbe41252c0b38206b983e94a (diff) | |
Merge branch 'newDocs'
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
| -rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 096a02d9b..9d356cc30 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -202,10 +202,11 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu CollectionDockingView.Instance.AddRightSplit(kvp); } makeButton = (e: React.MouseEvent): void => { - this.props.Document.isButton = !BoolCast(this.props.Document.isButton, false); - if (this.props.Document.isButton && !this.props.Document.nativeWidth) { - this.props.Document.nativeWidth = this.props.Document[WidthSym](); - this.props.Document.nativeHeight = this.props.Document[HeightSym](); + let doc = this.props.Document.proto ? this.props.Document.proto : this.props.Document; + doc.isButton = !BoolCast(doc.isButton, false); + if (doc.isButton && !doc.nativeWidth) { + doc.nativeWidth = doc[WidthSym](); + doc.nativeHeight = doc[HeightSym](); } } fullScreenClicked = (e: React.MouseEvent): void => { |
