diff options
| author | bobzel <zzzman@gmail.com> | 2021-04-15 00:04:18 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2021-04-15 00:04:18 -0400 |
| commit | 4334a553fdfdf44b1d1c609290fe2a874a408967 (patch) | |
| tree | 77ff61a8d14844d5e832fb409a9649fd47f7e105 /src/client/views/collections/CollectionCarouselView.tsx | |
| parent | 3ca56576e187e2f3cc87770b0fbdf8aa6cae73f3 (diff) | |
fixed up carousels to work with templated documents
Diffstat (limited to 'src/client/views/collections/CollectionCarouselView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionCarouselView.tsx | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/src/client/views/collections/CollectionCarouselView.tsx b/src/client/views/collections/CollectionCarouselView.tsx index 0642a1f9b..4a7bdf6db 100644 --- a/src/client/views/collections/CollectionCarouselView.tsx +++ b/src/client/views/collections/CollectionCarouselView.tsx @@ -7,7 +7,7 @@ import { collectionSchema, documentSchema } from '../../../fields/documentSchema import { makeInterface } from '../../../fields/Schema'; import { NumCast, ScriptCast, StrCast } from '../../../fields/Types'; import { OmitKeys, returnFalse } from '../../../Utils'; -import { DragManager } from '../../util/DragManager'; +import { DragManager, dropActionType } from '../../util/DragManager'; import { DocumentView } from '../nodes/DocumentView'; import { FormattedTextBox } from '../nodes/formattedText/FormattedTextBox'; import { StyleProp } from '../StyleProvider'; @@ -47,16 +47,34 @@ export class CollectionCarouselView extends CollectionSubView(CarouselDocument) return !(curDoc?.layout instanceof Doc) ? (null) : <> <div className="collectionCarouselView-image" key="image"> - <DocumentView {...OmitKeys(this.props, ["NativeWidth", "NativeHeight"]).omit} - onDoubleClick={this.onContentDoubleClick} - onClick={this.onContentClick} - renderDepth={this.props.renderDepth + 1} + <DocumentView + Document={curDoc.layout} + DataDoc={curDoc.layout.resolvedDataDoc as Doc} + styleProvider={this.props.styleProvider} + layerProvider={this.props.layerProvider} + docViewPath={this.props.docViewPath} LayoutTemplate={this.props.childLayoutTemplate} LayoutTemplateString={this.props.childLayoutString} - Document={curDoc.layout} - DataDoc={curDoc.data} + freezeDimensions={this.props.childFreezeDimensions} + renderDepth={this.props.renderDepth + 1} + PanelWidth={this.props.PanelWidth} PanelHeight={this.panelHeight} + rootSelected={this.rootSelected} + dropAction={StrCast(this.props.Document.childDropAction) as dropActionType} ScreenToLocalTransform={this.props.ScreenToLocalTransform} + focus={this.props.focus} + docFilters={this.docFilters} + isContentActive={returnFalse} + docRangeFilters={this.docRangeFilters} + searchFilterDocs={this.searchFilterDocs} + ContainingCollectionDoc={this.props.CollectionView?.props.Document} + ContainingCollectionView={this.props.CollectionView} + addDocument={this.props.addDocument} + moveDocument={this.props.moveDocument} + removeDocument={this.props.removeDocument} + whenChildContentsActiveChanged={this.props.whenChildContentsActiveChanged} + addDocTab={this.props.addDocTab} + pinToPres={this.props.pinToPres} bringToFront={returnFalse} /> </div> |
