diff options
author | bobzel <zzzman@gmail.com> | 2022-02-10 17:12:19 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2022-02-10 17:12:19 -0500 |
commit | 956628a22c2d8ae21eb76c70f8f0a5a4edc9ae75 (patch) | |
tree | 535fd5b10420d579d5334d22c2e6374b12feecf2 /src/client/views/nodes/CollectionFreeFormDocumentView.tsx | |
parent | a6d904bcd18a2c9962abfd9b5b325340f6b18b0d (diff) |
switched scripts to use a cache to avoid recompiling. simplified some things with documentView and zooming to avoid invalidations.
Diffstat (limited to 'src/client/views/nodes/CollectionFreeFormDocumentView.tsx')
-rw-r--r-- | src/client/views/nodes/CollectionFreeFormDocumentView.tsx | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx index 28a65f628..d8ba88c02 100644 --- a/src/client/views/nodes/CollectionFreeFormDocumentView.tsx +++ b/src/client/views/nodes/CollectionFreeFormDocumentView.tsx @@ -1,4 +1,4 @@ -import { action, computed, observable } from "mobx"; +import { action, computed, observable, trace } from "mobx"; import { observer } from "mobx-react"; import { Doc, Opt } from "../../../fields/Doc"; import { Document } from "../../../fields/documentSchemas"; @@ -154,14 +154,6 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF returnThis = () => this; render() { TraceMobx(); - - const panx = this.props.CollectionFreeFormView.panX(); - const pany = this.props.CollectionFreeFormView.panY(); - const viewWidth = this.props.CollectionFreeFormView.props.PanelWidth() / this.props.CollectionFreeFormView.zoomScaling() / 2; - const viewHeight = this.props.CollectionFreeFormView.props.PanelHeight() / this.props.CollectionFreeFormView.zoomScaling() / 2; - const hideContent = !this.props.CollectionFreeFormView.props.isAnnotationOverlay && - (Math.min(Math.abs(panx - (this.X + this.panelWidth())), Math.abs(panx - (this.X))) > viewWidth || - Math.min(Math.abs(pany - (this.Y + this.panelHeight())), Math.abs(pany - (this.Y))) > viewHeight) ? true : false; const divProps: DocumentViewProps = { ...this.props, CollectionFreeFormDocumentView: this.returnThis, @@ -170,7 +162,6 @@ export class CollectionFreeFormDocumentView extends DocComponent<CollectionFreeF ScreenToLocalTransform: this.screenToLocalTransform, PanelWidth: this.panelWidth, PanelHeight: this.panelHeight, - hideContent }; const background = this.props.styleProvider?.(this.rootDoc, this.props, StyleProp.BackgroundColor); const mixBlendMode = StrCast(this.layoutDoc.mixBlendMode) as any || (typeof background === "string" && DashColor(background).alpha() !== 1 ? "multiply" : undefined); |