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/DocumentDecorations.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/DocumentDecorations.tsx')
| -rw-r--r-- | src/client/views/DocumentDecorations.tsx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index 7260b00cf..1111cd2f5 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -442,11 +442,11 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> let actualdH = Math.max(height + (dH * scale), 20); doc.x = (doc.x || 0) + dX * (actualdW - width); doc.y = (doc.y || 0) + dY * (actualdH - height); - let proto = Doc.GetProto(doc); + let proto = Doc.GetProto(element.props.Document); let fixedAspect = e.ctrlKey || (!BoolCast(proto.ignoreAspect, false) && nwidth && nheight); if (fixedAspect && (!nwidth || !nheight)) { - proto.nativeWidth = doc.width; - proto.nativeHeight = doc.height; + proto.nativeWidth = nwidth = doc.width || 0; + proto.nativeHeight = nheight = doc.height || 0; proto.ignoreAspect = true; } if (nwidth > 0 && nheight > 0) { @@ -469,6 +469,7 @@ export class DocumentDecorations extends React.Component<{}, { value: string }> } else { doc.width = zoomBasis * actualdW; doc.height = zoomBasis * actualdH; + proto.autoHeight = undefined; } } }); |
