aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2021-02-23 22:36:52 -0500
committerbobzel <zzzman@gmail.com>2021-02-23 22:36:52 -0500
commit2cddc1cd6012a1c71c919124f640ce1d04593ec8 (patch)
tree3b40aa29a9e4f722c44979a62413212bb9355402 /src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
parent953e9dacf886aa5dff7331ca1f7ba7ba7f5373dd (diff)
removed _renderContentBounds and updated miniMap view.
Diffstat (limited to 'src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx')
-rw-r--r--src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
index 9fa5b8670..ba89579cd 100644
--- a/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
+++ b/src/client/views/collections/collectionFreeForm/CollectionFreeFormView.tsx
@@ -120,6 +120,7 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P
@computed get backgroundActive() { return this.props.layerProvider?.(this.layoutDoc) === false && (this.props.ContainingCollectionView?.active() || this.props.active()); }
@computed get fitToContentVals() {
return {
+ bounds: this.contentBounds,
panX: (this.contentBounds.x + this.contentBounds.r) / 2,
panY: (this.contentBounds.y + this.contentBounds.b) / 2,
scale: !this.childDocs.length ? 1 :
@@ -1214,15 +1215,6 @@ export class CollectionFreeFormView extends CollectionSubView<PanZoomDocument, P
this._disposers.layoutComputation = reaction(() => this.doLayoutComputation,
(elements) => this._layoutElements = elements || [],
{ fireImmediately: true, name: "doLayout" });
- if (!this.props.isAnnotationOverlay) {
- this._disposers.contentBounds = reaction(() => this.contentBounds,
- bounds => (!this.fitToContent && this._layoutElements?.length) && setTimeout(() => {
- const rbounds = Cast(this.Document._renderContentBounds, listSpec("number"), [0, 0, 0, 0]);
- if (rbounds[0] !== bounds.x || rbounds[1] !== bounds.y || rbounds[2] !== bounds.r || rbounds[3] !== bounds.b) {
- this.Document._renderContentBounds = new List<number>([bounds.x, bounds.y, bounds.r, bounds.b]);
- }
- }));
- }
this._marqueeRef.current?.addEventListener("dashDragAutoScroll", this.onDragAutoScroll as any);
}