aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/ImageBox.tsx
diff options
context:
space:
mode:
authorbob <bcz@cs.brown.edu>2019-11-18 15:08:05 -0500
committerbob <bcz@cs.brown.edu>2019-11-18 15:08:05 -0500
commit6ecbfba52bad2dd64e07472b5f4ef06f95b5544b (patch)
tree527b97635021fa3b2a75737920d9f4150f138806 /src/client/views/nodes/ImageBox.tsx
parent398d3f307ec177671ba43920258d0f23a58e49f2 (diff)
changing documentView to ignore transforms -- must be applied by view boxes
Diffstat (limited to 'src/client/views/nodes/ImageBox.tsx')
-rw-r--r--src/client/views/nodes/ImageBox.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/client/views/nodes/ImageBox.tsx b/src/client/views/nodes/ImageBox.tsx
index 212c99f9d..2a81c3577 100644
--- a/src/client/views/nodes/ImageBox.tsx
+++ b/src/client/views/nodes/ImageBox.tsx
@@ -268,6 +268,7 @@ export class ImageBox extends DocAnnotatableComponent<FieldViewProps, ImageDocum
}
@computed get content() {
+ trace();
const extensionDoc = this.extensionDoc;
if (!extensionDoc) return (null);
// let transform = this.props.ScreenToLocalTransform().inverse();
@@ -330,8 +331,10 @@ export class ImageBox extends DocAnnotatableComponent<FieldViewProps, ImageDocum
</div>);
}
+ contentFunc = () => [this.content];
render() {
- return (<div className={"imageBox-container"} onContextMenu={this.specificContextMenu}>
+ return (<div className={"imageBox-container"} onContextMenu={this.specificContextMenu}
+ style={{ transformOrigin: "top left", transform: `scale(${this.props.ContentScaling()})`, width: `${100 / this.props.ContentScaling()}%`, height: `${100 / this.props.ContentScaling()}%` }} >
<CollectionFreeFormView {...this.props}
PanelHeight={this.props.PanelHeight}
PanelWidth={this.props.PanelWidth}
@@ -352,7 +355,7 @@ export class ImageBox extends DocAnnotatableComponent<FieldViewProps, ImageDocum
renderDepth={this.props.renderDepth + 1}
ContainingCollectionDoc={this.props.ContainingCollectionDoc}
chromeCollapsed={true}>
- {() => [this.content]}
+ {this.contentFunc}
</CollectionFreeFormView>
</div >);
}