diff options
author | bobzel <zzzman@gmail.com> | 2022-07-08 12:37:06 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-07-08 12:37:06 -0400 |
commit | 5628b585fa6356d66cf2e7454be20e3b847ad22e (patch) | |
tree | 7836fd781c3cd82c00965d22c6bdf325414ef490 /src/client/views/MainView.tsx | |
parent | 146f8622d5bac2edc6b09f57c173bd057dfbcfad (diff) |
fixes for drawing ink on pdf/image/etc. fixes for showing contextMenu. moved gestureOverlay into main dashboard area to avoid drawing on UI widgets. more code cleanup to put things in reasonable places and avoid importing too much stuff.
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r-- | src/client/views/MainView.tsx | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx index edc16d9a6..b61cd3409 100644 --- a/src/client/views/MainView.tsx +++ b/src/client/views/MainView.tsx @@ -465,7 +465,7 @@ export class MainView extends React.Component { window.addEventListener('drop', e => e.preventDefault(), false); // prevent default behavior of navigating to a new web page window.addEventListener('dragover', e => e.preventDefault(), false); // document.addEventListener("pointermove", action(e => SearchBox.Instance._undoBackground = UndoManager.batchCounter ? "#000000a8" : undefined)); - document.addEventListener('pointerdown', this.globalPointerDown); + document.addEventListener('pointerdown', this.globalPointerDown, true); document.addEventListener( 'click', (e: MouseEvent) => { @@ -590,19 +590,21 @@ export class MainView extends React.Component { @computed get dockingContent() { return ( - <div - key="docking" - className={`mainView-dockingContent${this._leftMenuFlyoutWidth ? '-flyout' : ''}`} - onDrop={e => { - e.stopPropagation(); - e.preventDefault(); - }} - style={{ - minWidth: `calc(100% - ${this._leftMenuFlyoutWidth + this.leftMenuWidth() + this.propertiesWidth()}px)`, - transform: LightboxView.LightboxDoc ? 'scale(0.0001)' : undefined, - }}> - {!this.mainContainer ? null : this.mainDocView} - </div> + <GestureOverlay> + <div + key="docking" + className={`mainView-dockingContent${this._leftMenuFlyoutWidth ? '-flyout' : ''}`} + onDrop={e => { + e.stopPropagation(); + e.preventDefault(); + }} + style={{ + minWidth: `calc(100% - ${this._leftMenuFlyoutWidth + this.leftMenuWidth() + this.propertiesWidth()}px)`, + transform: LightboxView.LightboxDoc ? 'scale(0.0001)' : undefined, + }}> + {!this.mainContainer ? null : this.mainDocView} + </div> + </GestureOverlay> ); } @@ -974,7 +976,7 @@ export class MainView extends React.Component { <div style={{ position: 'relative', display: LightboxView.LightboxDoc ? 'none' : undefined, zIndex: 1999 }}> <CollectionMenu panelWidth={this.topMenuWidth} panelHeight={this.topMenuHeight} /> </div> - <GestureOverlay> {this.mainDashboardArea} </GestureOverlay> + {this.mainDashboardArea} </> ); case 'home': |