diff options
| author | bobzel <zzzman@gmail.com> | 2022-06-23 15:39:24 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-06-23 15:39:24 -0400 |
| commit | c230b687f467c20613f411795afffcfa55989042 (patch) | |
| tree | fe1c364561247e49f12246d9841c4679b48a05c2 /src/client/views/DocumentDecorations.tsx | |
| parent | eac5db4a6ae1ed3dbb2796fad92d090526dda537 (diff) | |
fixes for getBounds (& docDecorations) for docs with scroll heights & native Heights/
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
| -rw-r--r-- | src/client/views/DocumentDecorations.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx index bef7c85a4..669718e81 100644 --- a/src/client/views/DocumentDecorations.tsx +++ b/src/client/views/DocumentDecorations.tsx @@ -367,7 +367,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number, P let height = (docheight || (nheight / nwidth * width)); height = !height || isNaN(height) ? 20 : height; const scale = docView.props.ScreenToLocalTransform().Scale; - const modifyNativeDim = (e.ctrlKey || doc.forceReflow) && doc.nativeDimModifiable && ((!dragBottom && !dragTop) || doc.nativeHeightUnfrozen); + const modifyNativeDim = (e.ctrlKey || doc.forceReflow) && doc.nativeDimModifiable && ((!dragBottom && !dragTop) || e.ctrlKey || doc.nativeHeightUnfrozen); if (nwidth && nheight) { if (nwidth / nheight !== width / height && !dragBottom && !dragTop) { height = nheight / nwidth * width; @@ -379,7 +379,7 @@ export class DocumentDecorations extends React.Component<{ PanelWidth: number, P } let actualdW = Math.max(width + (dW * scale), 20); let actualdH = Math.max(height + (dH * scale), 20); - const fixedAspect = (nwidth && nheight && (!doc._fitWidth || doc.nativeHeightUnfrozen)); + const fixedAspect = (nwidth && nheight && (!doc._fitWidth || e.ctrlKey || doc.nativeHeightUnfrozen)); console.log(fixedAspect); if (fixedAspect) { if ((Math.abs(dW) > Math.abs(dH) && ((!dragBottom && !dragTop)|| !modifyNativeDim)) || dragRight) { |
