diff options
author | bobzel <zzzman@gmail.com> | 2020-12-14 02:01:57 -0500 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2020-12-14 02:01:57 -0500 |
commit | 37d9d2cad93a08518cec6c95c8bc941dd5f5ddaa (patch) | |
tree | 25b4fee39aeb543333b87b2d03f7fb4645bad1c2 /src/client/views/nodes/WebBox.tsx | |
parent | 257b259717486b984b90b75a8561b7b5c76a6964 (diff) |
more changes to ContentScaling to get web/video/image boxes to work with annotation/DocDecorations in contentfitting and freeform views.
Diffstat (limited to 'src/client/views/nodes/WebBox.tsx')
-rw-r--r-- | src/client/views/nodes/WebBox.tsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/WebBox.tsx b/src/client/views/nodes/WebBox.tsx index 0fffdf693..3064de03b 100644 --- a/src/client/views/nodes/WebBox.tsx +++ b/src/client/views/nodes/WebBox.tsx @@ -647,7 +647,7 @@ export class WebBox extends ViewBoxAnnotatableComponent<FieldViewProps, WebDocum marqueeY = () => this._marqueeY; marqueeing = () => this._marqueeing; @computed get contentScaling() { return this.props.scaling?.() || 1; } - scrollXf = () => this.props.ScreenToLocalTransform().scale(1 / this.contentScaling).translate(NumCast(this.layoutDoc._scrollLeft), NumCast(this.layoutDoc._scrollTop)); + scrollXf = () => this.props.ScreenToLocalTransform().scale(this.props.contentFittingXf?.() ? 1 : 1 / this.contentScaling).translate(NumCast(this.layoutDoc._scrollLeft), NumCast(this.layoutDoc._scrollTop)); scaling = () => this.contentScaling; render() { return (<div className="webBox" ref={this._mainCont} > @@ -700,7 +700,7 @@ export class WebBox extends ViewBoxAnnotatableComponent<FieldViewProps, WebDocum moveDocument={this.moveDocument} addDocument={this.addDocument} CollectionView={undefined} - ContentScaling={this.scaling} + scaling={this.scaling} ScreenToLocalTransform={this.scrollXf} renderDepth={this.props.renderDepth + 1}> </CollectionFreeFormView> |