aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/DocumentView.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2023-11-19 15:30:53 -0500
committerbobzel <zzzman@gmail.com>2023-11-19 15:30:53 -0500
commit3d18fc27f55c993de9c61297428690aa9c49184f (patch)
treec3b207dede28eed4a332040e38ffc2200c7b012e /src/client/views/nodes/DocumentView.tsx
parenta6b0fd0612667404dfc92052723d4a1ec5d9d72c (diff)
restored shallow observable to prevent pivot views from crashing.
Diffstat (limited to 'src/client/views/nodes/DocumentView.tsx')
-rw-r--r--src/client/views/nodes/DocumentView.tsx8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/client/views/nodes/DocumentView.tsx b/src/client/views/nodes/DocumentView.tsx
index 66a431bf0..0d6b88392 100644
--- a/src/client/views/nodes/DocumentView.tsx
+++ b/src/client/views/nodes/DocumentView.tsx
@@ -1534,10 +1534,7 @@ export class DocumentView extends React.Component<DocumentViewProps> {
if (this.docView._componentView?.screenBounds?.()) {
return this.docView._componentView.screenBounds();
}
- const xf = this.docView.props
- .ScreenToLocalTransform()
- .scale(this.trueNativeWidth() ? this.nativeScaling : 1)
- .inverse();
+ const xf = this.docView.props.ScreenToLocalTransform().scale(this.nativeScaling).inverse();
const [[left, top], [right, bottom]] = [xf.transformPoint(0, 0), xf.transformPoint(this.panelWidth, this.panelHeight)];
if (this.docView.props.LayoutTemplateString?.includes(LinkAnchorBox.name)) {
@@ -1617,12 +1614,11 @@ export class DocumentView extends React.Component<DocumentViewProps> {
PanelHeight = () => this.panelHeight;
NativeDimScaling = () => this.nativeScaling;
selfView = () => this;
- trueNativeWidth = () => returnVal(this.props.NativeWidth?.(), Doc.NativeWidth(this.layoutDoc, this.props.DataDoc, false));
screenToLocalTransform = () =>
this.props
.ScreenToLocalTransform()
.translate(-this.centeringX, -this.centeringY)
- .scale(this.trueNativeWidth() ? 1 / this.nativeScaling : 1);
+ .scale(1 / this.nativeScaling);
@action
componentDidMount() {