diff options
| author | bobzel <zzzman@gmail.com> | 2022-12-07 18:40:51 -0500 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2022-12-07 18:40:51 -0500 |
| commit | 7b8ca91984c41790de177e9d5275a230520cabc0 (patch) | |
| tree | 7e137779a665da640c117943029fef16e2ba0e0f /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | |
| parent | 6ffb3b6879fbe8e12b79eb00a316b08bf1993149 (diff) | |
stopped update _cache in ProxyField because it invalidates too much stuff during rendering. moved some setContentViews() to constructors for efficiency
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
| -rw-r--r-- | src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx index 8a5e202e7..50c427135 100644 --- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx +++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx @@ -122,6 +122,11 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection @observable ChildDrag: DocumentView | undefined; // child document view being dragged. needed to update drop areas of groups when a group item is dragged. @observable _brushedView = { width: 0, height: 0, panX: 0, panY: 0, opacity: 0 }; // highlighted region of freeform canvas used by presentations to indicate a region + constructor(props: any) { + super(props); + this.props.setContentView?.(this); + } + @computed get views() { const viewsMask = this._layoutElements.filter(ele => ele.bounds && !ele.bounds.z && ele.inkMask !== -1 && ele.inkMask !== undefined).map(ele => ele.ele); const renderableEles = this._layoutElements.filter(ele => ele.bounds && !ele.bounds.z && (ele.inkMask === -1 || ele.inkMask === undefined)).map(ele => ele.ele); @@ -1579,7 +1584,6 @@ export class CollectionFreeFormView extends CollectionSubView<Partial<collection @action componentDidMount() { super.componentDidMount?.(); - this.props.setContentView?.(this); this.props.setBrushViewer?.(this.brushView); setTimeout( action(() => { |
