aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionSchemaView.tsx
diff options
context:
space:
mode:
authorBob Zeleznik <zzzman@gmail.com>2019-09-30 20:56:10 -0400
committerBob Zeleznik <zzzman@gmail.com>2019-09-30 20:56:10 -0400
commit8790670f8e2173dd2a578500b3f03ad08ef793f2 (patch)
tree13f21a197b83753b2fc287e68ed1b9a59ee44e03 /src/client/views/collections/CollectionSchemaView.tsx
parent3a2ac5286e556be726440547309937945f650393 (diff)
switching presentatons to be colllections
Diffstat (limited to 'src/client/views/collections/CollectionSchemaView.tsx')
-rw-r--r--src/client/views/collections/CollectionSchemaView.tsx9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionSchemaView.tsx b/src/client/views/collections/CollectionSchemaView.tsx
index 8d931f812..77d86b2fa 100644
--- a/src/client/views/collections/CollectionSchemaView.tsx
+++ b/src/client/views/collections/CollectionSchemaView.tsx
@@ -166,6 +166,7 @@ export class CollectionSchemaView extends CollectionSubView(doc => doc) {
width={this.previewWidth}
height={this.previewHeight}
getTransform={this.getPreviewTransform}
+ CollectionDoc={this.props.CollectionView && this.props.CollectionView.props.Document}
CollectionView={this.props.CollectionView}
moveDocument={this.props.moveDocument}
addDocument={this.props.addDocument}
@@ -906,8 +907,10 @@ interface CollectionSchemaPreviewProps {
width: () => number;
height: () => number;
ruleProvider: Doc | undefined;
+ focus?: (doc: Doc) => void;
showOverlays?: (doc: Doc) => { title?: string, caption?: string };
CollectionView?: CollectionView | CollectionPDFView | CollectionVideoView;
+ CollectionDoc?: Doc;
onClick?: ScriptField;
getTransform: () => Transform;
addDocument: (document: Doc, allowDuplicates?: boolean) => boolean;
@@ -994,7 +997,7 @@ export class CollectionSchemaPreview extends React.Component<CollectionSchemaPre
height: this.props.height(),
width: this.props.width()
}}>
- <DocumentView
+ <DocumentView {...this.props}
DataDoc={this.props.DataDocument}
Document={this.props.Document}
fitToBox={this.props.fitToBox}
@@ -1006,7 +1009,7 @@ export class CollectionSchemaPreview extends React.Component<CollectionSchemaPre
moveDocument={this.props.moveDocument}
whenActiveChanged={this.props.whenActiveChanged}
ContainingCollectionView={this.props.CollectionView}
- ContainingCollectionDoc={this.props.CollectionView && this.props.CollectionView.props.Document}
+ ContainingCollectionDoc={this.props.CollectionDoc}
addDocTab={this.props.addDocTab}
pinToPres={this.props.pinToPres}
parentActive={this.props.active}
@@ -1015,7 +1018,7 @@ export class CollectionSchemaPreview extends React.Component<CollectionSchemaPre
ContentScaling={this.contentScaling}
PanelWidth={this.PanelWidth}
PanelHeight={this.PanelHeight}
- focus={emptyFunction}
+ focus={this.props.focus || emptyFunction}
backgroundColor={returnEmptyString}
bringToFront={emptyFunction}
zoomToScale={emptyFunction}