aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-12-13 13:58:56 -0500
committerbobzel <zzzman@gmail.com>2020-12-13 13:58:56 -0500
commit043fe3cb67003ddd0bc309b85e2b0dad353ed629 (patch)
tree1344b6940e5226cdb870353d496b924437195686 /src/client/views/nodes/CollectionFreeFormDocumentView.tsx
parent38c86111d73480228c61d81da9dc6c79747321af (diff)
more props cleanup. Got rid of ItemBackgroundColor in favor of having StyleProvider choose style based on whether it's givena DocViewProp or a FieldViewProp.
Diffstat (limited to 'src/client/views/nodes/CollectionFreeFormDocumentView.tsx')
-rw-r--r--src/client/views/nodes/CollectionFreeFormDocumentView.tsx6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
index 3f473460f..6eb8dc8c9 100644
--- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
+++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx
@@ -27,7 +27,7 @@ export interface CollectionFreeFormDocumentViewProps extends DocumentViewProps {
highlight?: boolean;
jitterRotation: number;
dataTransition?: string;
- fitToBox?: boolean;
+ fitDocToPanel?: boolean;
replica: string;
}
@@ -139,7 +139,7 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF
this.props.Document.x = NumCast(this.props.Document.x) + x;
this.props.Document.y = NumCast(this.props.Document.y) + y;
}
- contentScaling = () => this.nativeWidth > 0 && !this.props.fitToBox && !this.freezeDimensions ? this.width / this.nativeWidth : 1;
+ contentScaling = () => this.nativeWidth > 0 && !this.props.fitDocToPanel && !this.freezeDimensions ? this.width / this.nativeWidth : 1;
panelWidth = () => (this.sizeProvider?.width || this.props.PanelWidth?.());
panelHeight = () => (this.sizeProvider?.height || this.props.PanelHeight?.());
getTransform = (): Transform => this.props.ScreenToLocalTransform().translate(-this.X, -this.Y).scale(1 / this.contentScaling());
@@ -190,7 +190,7 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF
</svg>
</div>}
- {this.props.fitToBox ?
+ {this.props.fitDocToPanel ?
<ContentFittingDocumentView {...divProps} ref={action((r: ContentFittingDocumentView | null) => this._contentView = r)} /> :
<DocumentView {...divProps} ContentScaling={this.contentScaling} />}
</div>;