aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/MainView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2022-09-12 11:36:15 -0400
committerbobzel <zzzman@gmail.com>2022-09-12 11:36:15 -0400
commitf847c6d554f9dcecbd6c3024f712510f341daf67 (patch)
treeb47ff8a43992a5f236da5fdf8ef5f4f064a41440 /src/client/views/MainView.tsx
parent3993c034210f13e95717a3d417323e14bd8417b9 (diff)
made annotation pen available in lightbox.
Diffstat (limited to 'src/client/views/MainView.tsx')
-rw-r--r--src/client/views/MainView.tsx48
1 files changed, 20 insertions, 28 deletions
diff --git a/src/client/views/MainView.tsx b/src/client/views/MainView.tsx
index 45281ed69..d7b526d22 100644
--- a/src/client/views/MainView.tsx
+++ b/src/client/views/MainView.tsx
@@ -86,7 +86,7 @@ export class MainView extends React.Component {
return this._hideUI ? 0 : 27;
} // 27 comes form lm.config.defaultConfig.dimensions.headerHeight in goldenlayout.js
@computed private get topOfDashUI() {
- return this._hideUI ? 0 : Number(DASHBOARD_SELECTOR_HEIGHT.replace('px', ''));
+ return this._hideUI || LightboxView.LightboxDoc ? 0 : Number(DASHBOARD_SELECTOR_HEIGHT.replace('px', ''));
}
@computed private get topOfHeaderBarDoc() {
return this.topOfDashUI;
@@ -610,7 +610,7 @@ export class MainView extends React.Component {
@computed get dockingContent() {
return (
- <GestureOverlay>
+ <GestureOverlay isActive={LightboxView.LightboxDoc ? false : true}>
<div
key="docking"
className={`mainView-dockingContent${this._leftMenuFlyoutWidth ? '-flyout' : ''}`}
@@ -657,21 +657,16 @@ export class MainView extends React.Component {
const locationFields = doc._viewType === CollectionViewType.Docking ? ['dashboard'] : location.split(':');
const locationParams = locationFields.length > 1 ? locationFields[1] : '';
if (doc.dockingConfig) return DashboardView.openDashboard(doc);
+ // prettier-ignore
switch (locationFields[0]) {
- case 'dashboard':
- return DashboardView.openDashboard(doc);
- case 'close':
- return CollectionDockingView.CloseSplit(doc, locationParams);
- case 'fullScreen':
- return CollectionDockingView.OpenFullScreen(doc);
- case 'lightbox':
- return LightboxView.AddDocTab(doc, location);
- case 'toggle':
- return CollectionDockingView.ToggleSplit(doc, locationParams);
- case 'inPlace':
- case 'add':
default:
- return CollectionDockingView.AddSplit(doc, locationParams);
+ case 'inPlace':
+ case 'add': return CollectionDockingView.AddSplit(doc, locationParams);
+ case 'dashboard': return DashboardView.openDashboard(doc);
+ case 'close': return CollectionDockingView.CloseSplit(doc, locationParams);
+ case 'fullScreen': return CollectionDockingView.OpenFullScreen(doc);
+ case 'lightbox': return LightboxView.AddDocTab(doc, location);
+ case 'toggle': return CollectionDockingView.ToggleSplit(doc, locationParams);
}
};
@@ -716,7 +711,7 @@ export class MainView extends React.Component {
@computed get leftMenuPanel() {
return (
- <div key="menu" className="mainView-leftMenuPanel">
+ <div key="menu" className="mainView-leftMenuPanel" style={{ display: LightboxView.LightboxDoc ? 'none' : undefined }}>
<DocumentView
Document={Doc.MyLeftSidebarMenu}
DataDoc={undefined}
@@ -991,19 +986,16 @@ export class MainView extends React.Component {
{LinkDocPreview.LinkInfo ? <LinkDocPreview {...LinkDocPreview.LinkInfo} /> : null}
{((page: string) => {
+ // prettier-ignore
switch (page) {
- case 'dashboard':
default:
- return (
- <>
- <div style={{ position: 'relative', display: this._hideUI || LightboxView.LightboxDoc ? 'none' : undefined, zIndex: 2001 }}>
- <CollectionMenu panelWidth={this.topMenuWidth} panelHeight={this.topMenuHeight} />
- </div>
- {this.mainDashboardArea}
- </>
- );
- case 'home':
- return <DashboardView />;
+ case 'dashboard': return (<>
+ <div key="dashdiv" style={{ position: 'relative', display: this._hideUI || LightboxView.LightboxDoc ? 'none' : undefined, zIndex: 2001 }}>
+ <CollectionMenu panelWidth={this.topMenuWidth} panelHeight={this.topMenuHeight} />
+ </div>
+ {this.mainDashboardArea}
+ </> );
+ case 'home': return <DashboardView />;
}
})(Doc.ActivePage)}
@@ -1020,7 +1012,7 @@ export class MainView extends React.Component {
<InkTranscription />
{this.snapLines}
<div className="mainView-webRef" ref={this.makeWebRef} />
- <LightboxView PanelWidth={this._windowWidth} PanelHeight={this._windowHeight} maxBorder={[200, 50]} />
+ <LightboxView key="lightbox" PanelWidth={this._windowWidth} PanelHeight={this._windowHeight} maxBorder={[200, 50]} />
</div>
);
}