aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-03-04 10:36:09 -0500
committerbobzel <zzzman@gmail.com>2021-03-04 10:36:09 -0500
commit744dd170f0a4d4e4f2f83d763960edfd8cdb1924 (patch)
treee29d7e7986763550a95cbcda7a3613db20ef2ae5 /src/client/views/nodes
parentfee3821a95072ae31dbe7d79ef9e032040ef7738 (diff)
more adjustments to fitwidth behavior - want things to scroll vertically when they are fit width (eg images)
Diffstat (limited to 'src/client/views/nodes')
-rw-r--r--src/client/views/nodes/DocumentView.tsx2
-rw-r--r--src/client/views/nodes/ImageBox.scss2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 368964295..45dd3b545 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -1011,7 +1011,7 @@ export class DocumentView extends React.Component<DocumentViewProps> {
@computed get nativeScaling() {
if (this.shouldNotScale()) return 1;
const minTextScale = this.Document.type === DocumentType.RTF ? 0.1 : 0;
- if (this.props.PanelHeight() / this.effectiveNativeHeight > this.props.PanelWidth() / this.effectiveNativeWidth) {
+ if (this.layoutDoc._fitWidth || this.props.PanelHeight() / this.effectiveNativeHeight > this.props.PanelWidth() / this.effectiveNativeWidth) {
return Math.max(minTextScale, this.props.PanelWidth() / this.effectiveNativeWidth); // width-limited or fitWidth
}
return Math.max(minTextScale, this.props.PanelHeight() / this.effectiveNativeHeight); // height-limited or unscaled
diff --git a/src/client/views/nodes/ImageBox.scss b/src/client/views/nodes/ImageBox.scss
index 6d60c70bf..2536dbe16 100644
--- a/src/client/views/nodes/ImageBox.scss
+++ b/src/client/views/nodes/ImageBox.scss
@@ -101,7 +101,7 @@
margin: 0 auto;
display: flex;
height: 100%;
- overflow: hidden;
+ overflow: auto;
.imageBox-fadeBlocker {
width: 100%;