diff options
author | bobzel <zzzman@gmail.com> | 2020-12-12 22:52:26 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-12-12 22:52:26 -0500 |
commit | 890dd1c3d8d6a00cf3111972c20f7b5b9cb09085 (patch) | |
tree | e5a3b38b32771dd1d2162ca8cb30d82700423f9d /src/client/views/nodes/WebBox.tsx | |
parent | 9ca004669a7882123277eb46cad8e86b28305266 (diff) |
made conentScaling a DocumentView-only prop
Diffstat (limited to 'src/client/views/nodes/WebBox.tsx')
-rw-r--r-- | src/client/views/nodes/WebBox.tsx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index 47464d794..511e8f537 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -457,7 +457,7 @@ export class WebBox extends ViewBoxAnnotatableComponent<FieldViewProps, WebDocum return (<> <div className={"webBox-cont" + (this.props.isSelected() && Doc.GetSelectedTool() === InkTool.None && !DocumentDecorations.Instance?.Interacting ? "-interactive" : "")} - style={{ width: NumCast(this.layoutDoc[this.fieldKey + "-contentWidth"]) || (Number.isFinite(this.props.ContentScaling()) ? `${Math.max(100, 100 / this.props.ContentScaling())}% ` : "100%") }} + style={{ width: "100%" }} onWheel={this.onPostWheel} onPointerDown={this.onPostPointer} onPointerMove={this.onPostPointer} onPointerUp={this.onPostPointer}> {view} </div> @@ -648,14 +648,12 @@ export class WebBox extends ViewBoxAnnotatableComponent<FieldViewProps, WebDocum marqueeing = () => this._marqueeing; scrollXf = () => this.props.ScreenToLocalTransform().translate(NumCast(this.layoutDoc._scrollLeft), NumCast(this.layoutDoc._scrollTop)); render() { - const scaling = Number.isFinite(this.props.ContentScaling()) ? this.props.ContentScaling() || 1 : 1; return (<div className="webBox" ref={this._mainCont} > <div className={`webBox-container`} style={{ position: undefined, - transform: `scale(${scaling})`, - width: `${100 / scaling}% `, - height: `${100 / scaling}% `, + width: `${100}% `, + height: `${100}% `, pointerEvents: this.props.layerProvider?.(this.layoutDoc) === false ? "none" : undefined }} onContextMenu={this.specificContextMenu}> @@ -663,7 +661,7 @@ export class WebBox extends ViewBoxAnnotatableComponent<FieldViewProps, WebDocum {this.content} <div className={"webBox-outerContent"} ref={this._outerRef} style={{ - width: `${Math.max(100, 100 / scaling)}% `, + width: `${100}% `, pointerEvents: this.layoutDoc.isAnnotating && this.props.layerProvider?.(this.layoutDoc) !== false ? "all" : "none" }} onWheel={e => { |