aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/VideoBox.tsx
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2020-12-14 14:22:44 -0500
committerbobzel <zzzman@gmail.com>2020-12-14 14:22:44 -0500
commit8d9b38b64e61f2afb2b698004bcef7017d454078 (patch)
treea2d21b90747b347c012e8b12c34b0100b66ee0f0 /src/client/views/nodes/VideoBox.tsx
parent37d9d2cad93a08518cec6c95c8bc941dd5f5ddaa (diff)
got rid of fitDocToPanel. made collectionFreeFormDocView always use a ContentFittingDocView. fixed up web box selections.
Diffstat (limited to 'src/client/views/nodes/VideoBox.tsx')
-rw-r--r--src/client/views/nodes/VideoBox.tsx13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx
index 77db7189a..bc9c3f09d 100644
--- a/src/client/views/nodes/VideoBox.tsx
+++ b/src/client/views/nodes/VideoBox.tsx
@@ -414,18 +414,15 @@ export class VideoBox extends ViewBoxAnnotatableComponent<FieldViewProps, VideoD
return this.addDocument(doc);
}
- @computed get contentScaling() { return this.props.contentFittingXf?.() ? 1 : this.props.scaling?.() || 1; }
- scaling = () => this.contentScaling;
- screenToLocalTransform = () => this.props.ScreenToLocalTransform().scale(1 / this.scaling());
+ screenToLocalTransform = () => this.props.ScreenToLocalTransform();
contentFunc = () => [this.youtubeVideoId ? this.youtubeContent : this.content];
render() {
return (<div className="videoBox" onContextMenu={this.specificContextMenu}
style={{
- transform: this.props.PanelWidth() ? undefined : `scale(${this.contentScaling})`,
- width: this.props.PanelWidth() ? undefined : `${100 / this.contentScaling}%`,
- height: this.props.PanelWidth() ? undefined : `${100 / this.contentScaling}%`,
+ width: "100%",
+ height: "100%",
pointerEvents: this.props.layerProvider?.(this.layoutDoc) === false ? "none" : undefined,
- borderRadius: `${Number(StrCast(this.layoutDoc.borderRounding).replace("px", "")) / this.contentScaling}px`
+ borderRadius: `${Number(StrCast(this.layoutDoc.borderRounding).replace("px", ""))}px`
}} >
<div className="videoBox-viewer" >
<CollectionFreeFormView {...OmitKeys(this.props, ["NativeWidth", "NativeHeight"]).omit}
@@ -434,7 +431,7 @@ export class VideoBox extends ViewBoxAnnotatableComponent<FieldViewProps, VideoD
isAnnotationOverlay={true}
select={emptyFunction}
active={this.annotationsActive}
- scaling={this.scaling}
+ scaling={returnOne}
ScreenToLocalTransform={this.screenToLocalTransform}
whenActiveChanged={this.whenActiveChanged}
removeDocument={this.removeDocument}