diff options
| author | Joanne <zehan_ding@brown.edu> | 2025-05-12 20:58:01 -0400 |
|---|---|---|
| committer | Joanne <zehan_ding@brown.edu> | 2025-05-12 20:58:01 -0400 |
| commit | cd93c88b8fee83a99342eac4dc60f7b4373fa843 (patch) | |
| tree | b00d1f46c802752c90e54bb21be785a05e05195e /src/client/views/collections/collectionGrid | |
| parent | 4997c3de20a381eac30224a7a550afa66174f07d (diff) | |
| parent | 3a733aa0fd24517e83649824dec0fc8bcc0bde43 (diff) | |
added tutorial tool, still need to integrate with metadatatool
Diffstat (limited to 'src/client/views/collections/collectionGrid')
| -rw-r--r-- | src/client/views/collections/collectionGrid/CollectionGridView.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/collections/collectionGrid/CollectionGridView.tsx b/src/client/views/collections/collectionGrid/CollectionGridView.tsx index e7f1de7f1..1d5e70be7 100644 --- a/src/client/views/collections/collectionGrid/CollectionGridView.tsx +++ b/src/client/views/collections/collectionGrid/CollectionGridView.tsx @@ -182,17 +182,17 @@ export class CollectionGridView extends CollectionSubView() { isChildContentActive = () => (this._props.isDocumentActive?.() && (this._props.childDocumentsActive?.() || BoolCast(this.Document.childDocumentsActive)) ? true : undefined); /** * - * @param layout + * @param childLayout * @param dxf the x- and y-translations of the decorations box as a transform i.e. this.lookupIndividualTransform * @param width * @param height * @returns the `ContentFittingDocumentView` of the node */ - getDisplayDoc = (layout: Doc, dxf: () => Transform, width: () => number, height: () => number) => ( + getDisplayDoc = (childLayout: Doc, dxf: () => Transform, width: () => number, height: () => number) => ( <DocumentView {...this._props} - Document={layout} - TemplateDataDocument={layout.resolvedDataDoc as Doc} + Document={childLayout} + TemplateDataDocument={childLayout.isTemplateDoc || childLayout.isTemplateForField ? this._props.TemplateDataDocument : undefined} NativeWidth={returnZero} NativeHeight={returnZero} fitWidth={this._props.childLayoutFitWidth} @@ -201,6 +201,7 @@ export class CollectionGridView extends CollectionSubView() { isContentActive={this.isChildContentActive} PanelWidth={width} PanelHeight={height} + rejectDrop={this._props.childRejectDrop} ScreenToLocalTransform={dxf} setContentViewBox={emptyFunction} whenChildContentsActiveChanged={this._props.whenChildContentsActiveChanged} |
