diff options
author | Bob Zeleznik <zzzman@gmail.com> | 2020-01-16 09:59:21 -0500 |
---|---|---|
committer | Bob Zeleznik <zzzman@gmail.com> | 2020-01-16 09:59:21 -0500 |
commit | e410cde0e430553002d4e1a2f64364b57b65fdbc (patch) | |
tree | f9f18b8f7667b463045f6c20c382b1dde52da5ae /src/client/views/nodes/ContentFittingDocumentView.tsx | |
parent | c919514f854db67be96ec0f0283bdce635d53571 (diff) |
fixed context menu on mac. fixed exceptions with contentScaling and contentfittingviews. fixed sizing of mainview's contents
Diffstat (limited to 'src/client/views/nodes/ContentFittingDocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/ContentFittingDocumentView.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/ContentFittingDocumentView.tsx b/src/client/views/nodes/ContentFittingDocumentView.tsx index bbec66233..e97445f27 100644 --- a/src/client/views/nodes/ContentFittingDocumentView.tsx +++ b/src/client/views/nodes/ContentFittingDocumentView.tsx @@ -48,11 +48,11 @@ export class ContentFittingDocumentView extends React.Component<ContentFittingDo private get nativeWidth() { return NumCast(this.layoutDoc?.nativeWidth, this.props.PanelWidth()); } private get nativeHeight() { return NumCast(this.layoutDoc?.nativeHeight, this.props.PanelHeight()); } private contentScaling = () => { - const wscale = this.props.PanelWidth() / (this.nativeWidth ? this.nativeWidth : this.props.PanelWidth()); + const wscale = this.props.PanelWidth() / (this.nativeWidth || this.props.PanelWidth() || 1); if (wscale * this.nativeHeight > this.props.PanelHeight()) { - return this.props.PanelHeight() / (this.nativeHeight ? this.nativeHeight : this.props.PanelHeight()); + return (this.props.PanelHeight() / (this.nativeHeight || this.props.PanelHeight() || 1)) || 1; } - return wscale; + return wscale || 1; } @undoBatch |