aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/DocumentDecorations.tsx
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2021-02-11 16:43:46 -0500
committerusodhi <61431818+usodhi@users.noreply.github.com>2021-02-11 16:43:46 -0500
commit546540013de0a7cb647f30f1fcb513ce52048b72 (patch)
tree12b78ea0e29fba23b8557864540984daf9680942 /src/client/views/DocumentDecorations.tsx
parent77b7c3927c454a829d7dbb2748ad322b146265a7 (diff)
parent890337b525ea460f9986562c047135bc5ca203a6 (diff)
merging
Diffstat (limited to 'src/client/views/DocumentDecorations.tsx')
-rw-r--r--src/client/views/DocumentDecorations.tsx20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/client/views/DocumentDecorations.tsx b/src/client/views/DocumentDecorations.tsx
index 8d8f4cd3b..77b43db9b 100644
--- a/src/client/views/DocumentDecorations.tsx
+++ b/src/client/views/DocumentDecorations.tsx
@@ -23,6 +23,7 @@ import { DocumentButtonBar } from './DocumentButtonBar';
import './DocumentDecorations.scss';
import { KeyManager } from './GlobalKeyHandler';
import { InkStrokeProperties } from './InkStrokeProperties';
+import { LightboxView } from './LightboxView';
import { DocumentView } from "./nodes/DocumentView";
import React = require("react");
import e = require('express');
@@ -171,8 +172,13 @@ export class DocumentDecorations extends React.Component<{ boundsLeft: number, b
alias.x = -alias[WidthSym]() / 2;
alias.y = -alias[HeightSym]() / 2;
CollectionDockingView.AddSplit(Docs.Create.FreeformDocument([alias], { title: "Tab for " + alias.title }), "right");
- } else { // open same document in new tab
+ } else if (e.altKey) { // open same document in new tab
CollectionDockingView.ToggleSplit(Cast(selectedDocs[0].props.Document._fullScreenView, Doc, null) || selectedDocs[0].props.Document, "right");
+ } else {
+ runInAction(() => {
+ LightboxView.LightboxDoc = selectedDocs[0].props.Document;
+ LightboxView.LightboxFuture = selectedDocs.slice(1).map(view => view.props.Document);
+ });
}
}
}
@@ -569,10 +575,12 @@ export class DocumentDecorations extends React.Component<{ boundsLeft: number, b
<FontAwesomeIcon className="documentdecorations-times" icon={"times"} size="lg" />
</div></Tooltip>);
- const openIcon = !canOpen ? (null) : <Tooltip key="open" title={<div className="dash-tooltip">Open in Tab (ctrl: as alias, shift: in new collection)</div>} placement="top"><div className="documentDecorations-openInTab" onContextMenu={e => { e.preventDefault(); e.stopPropagation(); }} onPointerDown={this.onMaximizeDown}>
- {SelectionManager.Views().length === 1 ? <FontAwesomeIcon icon="external-link-alt" className="documentView-minimizedIcon" /> : "..."}
- </div>
- </Tooltip>;
+ const openIcon = !canOpen ? (null) :
+ <Tooltip key="open" title={<div className="dash-tooltip">Open in Tab (ctrl: as alias, shift: in new collection)</div>} placement="top">
+ <div className="documentDecorations-openInTab" onContextMenu={e => { e.preventDefault(); e.stopPropagation(); }} onPointerDown={this.onMaximizeDown}>
+ <FontAwesomeIcon icon="external-link-alt" className="documentView-minimizedIcon" />
+ </div>
+ </Tooltip>;
const titleArea = this._edtingTitle ?
<input ref={this._keyinput} className="documentDecorations-title" type="text" name="dynbox" autoComplete="on" value={this._accumulatedTitle}
@@ -601,7 +609,7 @@ export class DocumentDecorations extends React.Component<{ boundsLeft: number, b
left: bounds.x - this._resizeBorderWidth / 2,
top: bounds.y - this._resizeBorderWidth / 2,
pointerEvents: KeyManager.Instance.ShiftPressed || this.Interacting ? "none" : "all",
- zIndex: SelectionManager.Views().length > 1 ? 900 : 0,
+ display: SelectionManager.Views().length <= 1 ? "none" : undefined
}} onPointerDown={this.onBackgroundDown} onContextMenu={e => { e.preventDefault(); e.stopPropagation(); }} >
</div>
{bounds.r - bounds.x < 15 && bounds.b - bounds.y < 15 ? (null) : <>