aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/CollectionCarouselView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-09-08 21:20:47 -0400
committerbobzel <zzzman@gmail.com>2020-09-08 21:20:47 -0400
commite50297237ee3dfa1e652c0d46cb9d860e5cd5b20 (patch)
treef2a0a2c5bd73aeea746716d2404a584b25029265 /src/client/views/collections/CollectionCarouselView.tsx
parenta60b9998dc6cd05137cf3fe46714c3069843b57b (diff)
fixes to make nativesize work for all collections and templates.
Diffstat (limited to 'src/client/views/collections/CollectionCarouselView.tsx')
-rw-r--r--src/client/views/collections/CollectionCarouselView.tsx7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionCarouselView.tsx b/src/client/views/collections/CollectionCarouselView.tsx
index f93993e2a..3fbc6ec45 100644
--- a/src/client/views/collections/CollectionCarouselView.tsx
+++ b/src/client/views/collections/CollectionCarouselView.tsx
@@ -13,7 +13,7 @@ import { Doc } from '../../../fields/Doc';
import { FormattedTextBox } from '../nodes/formattedText/FormattedTextBox';
import { ContextMenu } from '../ContextMenu';
import { ObjectField } from '../../../fields/ObjectField';
-import { returnFalse, returnZero } from '../../../Utils';
+import { returnFalse, returnZero, OmitKeys } from '../../../Utils';
import { ScriptField } from '../../../fields/ScriptField';
type CarouselDocument = makeInterface<[typeof documentSchema, typeof collectionSchema]>;
@@ -50,13 +50,14 @@ export class CollectionCarouselView extends CollectionSubView(CarouselDocument)
return !(curDoc?.layout instanceof Doc) ? (null) :
<>
<div className="collectionCarouselView-image" key="image">
- <ContentFittingDocumentView {...this.props}
+ <ContentFittingDocumentView {...OmitKeys(this.props, ["NativeWidth", "NativeHeight"]).omit}
onDoubleClick={this.onContentDoubleClick}
onClick={this.onContentClick}
renderDepth={this.props.renderDepth + 1}
LayoutTemplate={this.props.ChildLayoutTemplate}
LayoutTemplateString={this.props.ChildLayoutString}
- NativeWidth={layoutTemp ? returnZero : this.props.NativeWidth}
+ NativeWidth={undefined}
+ NativeHeight={undefined}
Document={curDoc.layout}
DataDoc={curDoc.data}
PanelHeight={this.panelHeight}