From 1304bd7306ff9075455282624cb2385c5aeaf0fb Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 14 Dec 2020 14:31:55 -0500 Subject: got rid of setting width/height properties within CollecitonFreeFormDocView becuase they get set now in ContentFittingDocView --- .../views/nodes/CollectionFreeFormDocumentView.tsx | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) (limited to 'src/client/views/nodes/CollectionFreeFormDocumentView.tsx') diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx index 667962889..b124263e7 100644 --- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx +++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx @@ -31,6 +31,7 @@ export interface CollectionFreeFormDocumentViewProps extends DocumentViewProps { @observer export class CollectionFreeFormDocumentView extends DocComponent(Document) { + static animFields = ["_height", "_width", "x", "y", "_scrollTop", "opacity"]; // fields that are configured to be animatable using animation frames @observable _animPos: number[] | undefined = undefined; @observable _contentView: ContentFittingDocumentView | undefined | null; random(min: number, max: number) { // min should not be equal to max @@ -47,15 +48,8 @@ export class CollectionFreeFormDocumentView extends DocComponent, property: string) => { @@ -63,7 +57,6 @@ export class CollectionFreeFormDocumentView extends DocComponent { p[val] = Cast(`${val}-indexed`, listSpec("number"), [NumCast(doc[val])]).reduce((p, v, i) => (i <= Math.round(time) && v !== undefined) || p === undefined ? v : p, undefined as any as number); @@ -141,8 +134,6 @@ export class CollectionFreeFormDocumentView extends DocComponent (this.sizeProvider?.height || this.props.PanelHeight?.()); screenToLocalTransform = (): Transform => this.props.ScreenToLocalTransform().translate(-this.X, -this.Y); focusDoc = (doc: Doc) => this.props.focus(doc, false); - NativeWidth = () => this.nativeWidth; - NativeHeight = () => this.nativeHeight; returnThis = () => this; render() { TraceMobx(); @@ -152,24 +143,20 @@ export class CollectionFreeFormDocumentView extends DocComponent