diff options
| author | bob <bcz@cs.brown.edu> | 2019-06-11 16:45:48 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-06-11 16:45:48 -0400 |
| commit | fcae0da16f9413059d03638ba10ab30cdc460a42 (patch) | |
| tree | 6ca9f829b588598db144afc73c77373cb4301fb2 /src/client/views/nodes/DocumentView.tsx | |
| parent | 06d5bb5c65da6f4a115ebf8118989115420bccef (diff) | |
fixed text input to allow typing from the bottom (caption) and to allow text boxes to grow vertically (autoHeight)
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
| -rw-r--r-- | src/client/views/nodes/DocumentView.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index 19f5c7d36..2428103d1 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -317,13 +317,13 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu makeBtnClicked = (): void => { let doc = Doc.GetProto(this.props.Document); doc.isButton = !BoolCast(doc.isButton, false); - if (StrCast(doc.layout).indexOf("Formatted") !== -1) { // only need to freeze the dimensions of text boxes since they don't have a native width and height naturally - if (doc.isButton && !doc.nativeWidth) { + if (doc.isButton) { + if (!doc.nativeWidth) { doc.nativeWidth = this.props.Document[WidthSym](); doc.nativeHeight = this.props.Document[HeightSym](); - } else { - doc.nativeWidth = doc.nativeHeight = undefined; } + } else { + doc.nativeWidth = doc.nativeHeight = undefined; } } fullScreenClicked = (): void => { |
