diff options
| author | bobzel <zzzman@gmail.com> | 2023-05-10 10:08:50 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2023-05-10 10:08:50 -0400 |
| commit | ebb846116af9c7e65a9d674c765c71c0bf0a7d29 (patch) | |
| tree | d8278e7c27f7577eb5b4706604144940d12a718e /src/client/views/collections/CollectionCarouselView.tsx | |
| parent | f912a233a89c8772b22b71d34830ff4b0ba82310 (diff) | |
| parent | 719da9462f02fd3afda9b0b65de19de9405ab4fc (diff) | |
Merge branch 'master' into UI_Update_Eric_Ma
Diffstat (limited to 'src/client/views/collections/CollectionCarouselView.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionCarouselView.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/collections/CollectionCarouselView.tsx b/src/client/views/collections/CollectionCarouselView.tsx index 32f6207ed..0e4556eb4 100644 --- a/src/client/views/collections/CollectionCarouselView.tsx +++ b/src/client/views/collections/CollectionCarouselView.tsx @@ -4,7 +4,7 @@ import { observer } from 'mobx-react'; import * as React from 'react'; import { Doc, Opt } from '../../../fields/Doc'; import { NumCast, ScriptCast, StrCast } from '../../../fields/Types'; -import { OmitKeys, returnFalse } from '../../../Utils'; +import { emptyFunction, returnFalse, returnZero } from '../../../Utils'; import { DragManager } from '../../util/DragManager'; import { DocumentView, DocumentViewProps } from '../nodes/DocumentView'; import { FormattedTextBox } from '../nodes/formattedText/FormattedTextBox'; @@ -47,7 +47,7 @@ export class CollectionCarouselView extends CollectionSubView() { @computed get content() { const index = NumCast(this.layoutDoc._itemIndex); const curDoc = this.childLayoutPairs?.[index]; - const captionProps = { ...OmitKeys(this.props, ['setHeight']).omit, fieldKey: 'caption' }; + const captionProps = { ...this.props, fieldKey: 'caption', setHeight: undefined }; const marginX = NumCast(this.layoutDoc['caption-xMargin']); const marginY = NumCast(this.layoutDoc['caption-yMargin']); const showCaptions = StrCast(this.layoutDoc._showCaption); @@ -55,12 +55,13 @@ export class CollectionCarouselView extends CollectionSubView() { <> <div className="collectionCarouselView-image" key="image"> <DocumentView - {...OmitKeys(this.props, ['setHeight', 'NativeWidth', 'NativeHeight', 'childLayoutTemplate', 'childLayoutString']).omit} + {...this.props} + NativeWidth={returnZero} + NativeHeight={returnZero} onDoubleClick={this.onContentDoubleClick} onClick={this.onContentClick} hideCaptions={showCaptions ? true : false} renderDepth={this.props.renderDepth + 1} - ContainingCollectionView={this.props.CollectionView} LayoutTemplate={this.props.childLayoutTemplate} LayoutTemplateString={this.props.childLayoutString} Document={curDoc.layout} |
