From e410cde0e430553002d4e1a2f64364b57b65fdbc Mon Sep 17 00:00:00 2001 From: Bob Zeleznik Date: Thu, 16 Jan 2020 09:59:21 -0500 Subject: fixed context menu on mac. fixed exceptions with contentScaling and contentfittingviews. fixed sizing of mainview's contents --- src/client/views/MainView.scss | 8 ++++++++ src/client/views/nodes/ContentFittingDocumentView.tsx | 6 +++--- src/client/views/nodes/DocumentView.tsx | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/client/views/MainView.scss b/src/client/views/MainView.scss index 4c8c95529..c7fc6096a 100644 --- a/src/client/views/MainView.scss +++ b/src/client/views/MainView.scss @@ -5,6 +5,9 @@ .mainView-tabButtons { position: relative; width: 100%; + .documentView-node-topmost { + height: 200% !important; + } } .mainContent-div { @@ -13,6 +16,11 @@ height:100%; } +.mainView-contentArea { + .documentView-node-topmost { + height: 200% !important; + } +} // add nodes menu. Note that the + button is actually an input label, not an actual button. .mainView-docButtons { position: absolute; 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 { - 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 diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx index b2c2ccff5..dabe5a7aa 100644 --- a/src/client/views/nodes/DocumentView.tsx +++ b/src/client/views/nodes/DocumentView.tsx @@ -583,7 +583,7 @@ export class DocumentView extends DocComponent(Docu @action onContextMenu = async (e: React.MouseEvent): Promise => { // the touch onContextMenu is button 0, the pointer onContextMenu is button 2 - if (e.button === 0) { + if (e.button === 0 && !e.ctrlKey) { e.preventDefault(); return; } -- cgit v1.2.3-70-g09d2