diff options
author | eleanor-park <eleanor_park@brown.edu> | 2025-01-08 11:15:25 -0500 |
---|---|---|
committer | eleanor-park <eleanor_park@brown.edu> | 2025-01-08 11:15:25 -0500 |
commit | 8283499ca247da4f283f220d368e5e178c4d79a1 (patch) | |
tree | fbf39aa81c7d8e82dd9844d6e14392e6ad78e22d /src/client/views/nodes/WebBox.tsx | |
parent | 45e22be891331e2d6a381e988c7abd29af3e1399 (diff) | |
parent | 2f7d1f0073943e1eb9e0f34c4459bc0176377697 (diff) |
Merge branch 'eleanor-gptdraw' of https://github.com/brown-dash/Dash-Web into eleanor-gptdraw
Diffstat (limited to 'src/client/views/nodes/WebBox.tsx')
-rw-r--r-- | src/client/views/nodes/WebBox.tsx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index 9ba4f8ead..6026d9ca7 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -202,8 +202,9 @@ export class WebBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { () => this.layoutDoc._layout_autoHeight, layoutAutoHeight => { if (layoutAutoHeight) { - this.layoutDoc._nativeHeight = NumCast(this.Document[this._props.fieldKey + '_nativeHeight']); - this._props.setHeight?.(NumCast(this.Document[this._props.fieldKey + '_nativeHeight']) * (this._props.NativeDimScaling?.() || 1)); + const nh = NumCast(this.Document[this._props.fieldKey + '_nativeHeight'], NumCast(this.Document.nativeHeight)); + this.layoutDoc._nativeHeight = nh; + this._props.setHeight?.(nh * (this._props.NativeDimScaling?.() || 1)); } } ); @@ -1195,6 +1196,7 @@ export class WebBox extends ViewBoxAnnotatableComponent<FieldViewProps>() { scaling={this._props.NativeDimScaling} addDocument={this.addDocumentWrapper} docView={this.DocumentView} + screenTransform={this.DocumentView().screenToViewTransform} finishMarquee={this.finishMarquee} savedAnnotations={this.savedAnnotationsCreator} selectionText={this.selectionText} |