aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-09-01 13:08:18 -0400
committerbobzel <zzzman@gmail.com>2020-09-01 13:08:18 -0400
commitd0ee23b95aef2b57eb8d02d8441568c2f6ba2a14 (patch)
tree1354254d864f6774f21f66a7ec376861d89f0bba /src
parent124ac1ca9070e1997e7ab9d667255cec924c79dc (diff)
fixed locking document to set nativewidth/height correctly
Diffstat (limited to 'src')
-rw-r--r--src/client/views/nodes/DocumentView.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 2f2a324c8..0182e652f 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -709,8 +709,10 @@ export class DocumentView extends DocComponent<DocumentViewProps, Document>(Docu
this.Document._overflow = this.Document._isBackground ? "visible" : undefined;
if (this.Document._isBackground) {
this.props.bringToFront(this.props.Document, true);
- this.props.Document[DataSym][Doc.LayoutFieldKey(this.Document) + "-nativeWidth"] = this.Document[WidthSym]();
- this.props.Document[DataSym][Doc.LayoutFieldKey(this.Document) + "-nativeHeight"] = this.Document[HeightSym]();
+ const wid = this.Document[WidthSym](); // change the nativewidth and height if the background is to be a collection that aggregates stuff that is added to it.
+ const hgt = this.Document[HeightSym]();
+ this.props.Document[DataSym][Doc.LayoutFieldKey(this.Document) + "-nativeWidth"] = wid;
+ this.props.Document[DataSym][Doc.LayoutFieldKey(this.Document) + "-nativeHeight"] = hgt;
}
}