aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-07-21 13:28:25 -0400
committerbobzel <zzzman@gmail.com>2022-07-21 13:28:25 -0400
commit8f0752368e4c5831b909050940dff42171d51ae7 (patch)
tree0671a690c3470eefb51104af133b6dd5aa81337a /src/client/views/nodes/DocumentView.tsx
parent2c833fe4e7915b8219c6b48abb596e4359744750 (diff)
fixed undo for opening/closing sidebar for pdf/web/text. fixed lightboxview for pdf's with smaller heights.
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index dea718a0d..3a8552325 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -1492,7 +1492,9 @@ export class DocumentView extends React.Component<DocumentViewProps> {
return this.effectiveNativeWidth ? (this.props.PanelWidth() - this.effectiveNativeWidth * this.nativeScaling) / 2 : 0;
}
@computed get Yshift() {
- return this.effectiveNativeWidth && this.effectiveNativeHeight && Math.abs(this.Xshift) < 0.001 && !this.layoutDoc.nativeHeightUnfrozen ? Math.max(0, (this.props.PanelHeight() - this.effectiveNativeHeight * this.nativeScaling) / 2) : 0;
+ return this.effectiveNativeWidth && this.effectiveNativeHeight && Math.abs(this.Xshift) < 0.001 && (!this.layoutDoc.nativeHeightUnfrozen || (!this.fitWidth && this.effectiveNativeHeight * this.nativeScaling <= this.props.PanelHeight()))
+ ? Math.max(0, (this.props.PanelHeight() - this.effectiveNativeHeight * this.nativeScaling) / 2)
+ : 0;
}
@computed get centeringX() {
return this.props.dontCenter?.includes('x') ? 0 : this.Xshift;