aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-02-02 13:53:50 -0500
committerbobzel <zzzman@gmail.com>2021-02-02 13:53:50 -0500
commit2e26c14fe82fa7dfdeb51398558101a0047743e6 (patch)
treee5916f24085ffa228bd8a2f8827d9a89976caaac /src/client/views/collections
parent41bb365dd4f787aec2262dcb07508e0de3837e10 (diff)
playing with a general lightbox for Dash documents.
Diffstat (limited to 'src/client/views/collections')
-rw-r--r--src/client/views/collections/TabDocView.tsx5
-rw-r--r--src/client/views/collections/collectionFreeForm/MarqueeView.tsx6
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}