diff options
| author | bobzel <zzzman@gmail.com> | 2021-02-02 13:53:50 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-02-02 13:53:50 -0500 |
| commit | 2e26c14fe82fa7dfdeb51398558101a0047743e6 (patch) | |
| tree | e5916f24085ffa228bd8a2f8827d9a89976caaac /src/client/views/collections | |
| parent | 41bb365dd4f787aec2262dcb07508e0de3837e10 (diff) | |
playing with a general lightbox for Dash documents.
Diffstat (limited to 'src/client/views/collections')
| -rw-r--r-- | src/client/views/collections/TabDocView.tsx | 5 | ||||
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/MarqueeView.tsx | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/src/client/views/collections/TabDocView.tsx b/src/client/views/collections/TabDocView.tsx index c66734556..d291a703b 100644 --- a/src/client/views/collections/TabDocView.tsx +++ b/src/client/views/collections/TabDocView.tsx @@ -33,6 +33,7 @@ import { CollectionViewType } from './CollectionView'; import "./TabDocView.scss"; import React = require("react"); import Color = require('color'); +import { MainView } from '../MainView'; const _global = (window /* browser */ || global /* node */) as any; interface TabDocViewProps { @@ -279,7 +280,9 @@ export class TabDocView extends React.Component<TabDocViewProps> { case "replace": return CollectionDockingView.ReplaceTab(doc, locationParams, this.stack); case "inPlace": case "add": - default: return CollectionDockingView.AddSplit(doc, locationParams, this.stack); + default: runInAction(() => MainView.Instance.LightboxDoc = doc); + if (MainView.Instance.LightboxDoc) return true; + return CollectionDockingView.AddSplit(doc, locationParams, this.stack); } } diff --git a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx index 0edbfe7a5..f7fb2b83d 100644 --- a/src/client/views/collections/collectionFreeForm/MarqueeView.tsx +++ b/src/client/views/collections/collectionFreeForm/MarqueeView.tsx @@ -643,7 +643,11 @@ export class MarqueeView extends React.Component<SubCollectionViewProps & Marque render() { return <div className="marqueeView" - style={{ overflow: (!this.props.ContainingCollectionView && this.props.isAnnotationOverlay) ? "visible" : StrCast(this.props.Document._overflow), cursor: MarqueeView.DragMarquee && this ? "crosshair" : "hand" }} + style={{ + overflow: (!this.props.ContainingCollectionView && this.props.isAnnotationOverlay) ? "visible" : + StrCast(this.props.Document._overflow), + cursor: MarqueeView.DragMarquee && this ? "crosshair" : "hand" + }} onDragOver={e => e.preventDefault()} onScroll={(e) => e.currentTarget.scrollTop = e.currentTarget.scrollLeft = 0} onClick={this.onClick} onPointerDown={this.onPointerDown}> {this._visible ? this.marqueeDiv : null} |
