aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionDockingView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-04-16 23:09:03 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-04-16 23:09:03 -0400
commit21b1e20106ff49c02657c88f503ef46bc7e4fb07 (patch)
tree36c4f1be57a14863219fd5af32f945e08f443de2 /src/client/views/collections/CollectionDockingView.tsx
parentcaecf2452c4af5caf8b298719d53274b6709c194 (diff)
various bug fixes
Diffstat (limited to 'src/client/views/collections/CollectionDockingView.tsx')
-rw-r--r--src/client/views/collections/CollectionDockingView.tsx7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/client/views/collections/CollectionDockingView.tsx b/src/client/views/collections/CollectionDockingView.tsx
index 4ea21b2f5..b998362f4 100644
--- a/src/client/views/collections/CollectionDockingView.tsx
+++ b/src/client/views/collections/CollectionDockingView.tsx
@@ -327,7 +327,12 @@ export class DockedFrameRenderer extends React.Component<DockedFrameProps> {
private _nativeWidth = () => this._document!.GetNumber(KeyStore.NativeWidth, this._panelWidth);
private _nativeHeight = () => this._document!.GetNumber(KeyStore.NativeHeight, this._panelHeight);
- private _contentScaling = () => this._panelWidth / (this._nativeWidth() ? this._nativeWidth() : this._panelWidth);
+ private _contentScaling = () => {
+ let wscale = this._panelWidth / (this._nativeWidth() ? this._nativeWidth() : this._panelWidth);
+ if (wscale * this._nativeHeight() > this._panelHeight)
+ return this._panelHeight / (this._nativeHeight() ? this._nativeHeight() : this._panelHeight);
+ return wscale;
+ }
ScreenToLocalTransform = () => {
let { scale, translateX, translateY } = Utils.GetScreenTransform(this._mainCont.current!);