diff options
author | bobzel <zzzman@gmail.com> | 2020-08-05 12:32:34 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-08-05 12:32:34 -0400 |
commit | aebfc10f1cb26e8db850611170db88dbbd88136f (patch) | |
tree | aca197065961a92f8f9dcb4fb14247e91fd3cb11 | |
parent | 7e18d27de76bd2b58281841910aee3c4829269dd (diff) | |
parent | 1c54fb50438698bbc7a533ff98102e2a41458017 (diff) |
Merge branch 'master' into ink_edits
-rw-r--r-- | src/client/views/collections/CollectionDockingView.tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx index 533c8bffe..75a4bda14 100644 --- a/src/client/views/collections/CollectionDockingView.tsx +++ b/src/client/views/collections/CollectionDockingView.tsx @@ -793,10 +793,10 @@ export class DockedFrameRenderer extends React.Component<DockedFrameProps> { let scaling = 1; if (!this.layoutDoc?._fitWidth && (!nativeW || !nativeH)) { scaling = 1; - } else if ((this.layoutDoc?._fitWidth) || - this._panelHeight / NumCast(this.layoutDoc!._nativeHeight) > this._panelWidth / NumCast(this.layoutDoc!._nativeWidth)) { + } else if (NumCast(this.layoutDoc!._nativeWidth) && ((this.layoutDoc?._fitWidth) || + this._panelHeight / NumCast(this.layoutDoc!._nativeHeight) > this._panelWidth / NumCast(this.layoutDoc!._nativeWidth))) { scaling = this._panelWidth / NumCast(this.layoutDoc!._nativeWidth); - } else { + } else if (nativeW && nativeH) { // if (this.layoutDoc!.type === DocumentType.PDF || this.layoutDoc!.type === DocumentType.WEB) { // if ((this.layoutDoc?._fitWidth) || // this._panelHeight / NumCast(this.layoutDoc!._nativeHeight) > this._panelWidth / NumCast(this.layoutDoc!._nativeWidth)) { @@ -807,7 +807,7 @@ export class DockedFrameRenderer extends React.Component<DockedFrameProps> { // } const wscale = this.panelWidth() / nativeW; scaling = wscale * nativeH > this._panelHeight ? this._panelHeight / nativeH : wscale; - } + } else scaling = 1; return scaling; } |