aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/nodes/VideoBox.tsx
diff options
context:
space:
mode:
authorTyler Schicke <tyler_schicke@brown.edu>2019-05-11 22:55:44 -0400
committerTyler Schicke <tyler_schicke@brown.edu>2019-05-11 22:55:44 -0400
commit0103346e8bae5113f5ea6f34d2745addac3a192e (patch)
treed28a39521298a76682688bf688447e7a1b5604b6 /src/client/views/nodes/VideoBox.tsx
parent7da76d2538ebde21d7a878b5096d5a673e5d6375 (diff)
Changed measure params that we use
Diffstat (limited to 'src/client/views/nodes/VideoBox.tsx')
-rw-r--r--src/client/views/nodes/VideoBox.tsx4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/client/views/nodes/VideoBox.tsx b/src/client/views/nodes/VideoBox.tsx
index 422508f90..97c5d8818 100644
--- a/src/client/views/nodes/VideoBox.tsx
+++ b/src/client/views/nodes/VideoBox.tsx
@@ -35,7 +35,7 @@ export class VideoBox extends DocComponent<FieldViewProps, VideoDocument>(VideoD
// bcz: the nativeHeight should really be set when the document is imported.
var nativeWidth = FieldValue(this.Document.nativeWidth, 0);
var nativeHeight = FieldValue(this.Document.nativeHeight, 0);
- var newNativeHeight = nativeWidth * r.entry.height / r.entry.width;
+ var newNativeHeight = nativeWidth * r.offset.height / r.offset.width;
if (!nativeHeight && newNativeHeight !== nativeHeight && !isNaN(newNativeHeight)) {
this.Document.height = newNativeHeight / nativeWidth * FieldValue(this.Document.width, 0);
this.Document.nativeHeight = newNativeHeight;
@@ -71,7 +71,7 @@ export class VideoBox extends DocComponent<FieldViewProps, VideoDocument>(VideoD
let content = this.videoContent(field.url.href);
return NumCast(this.props.Document.nativeHeight) ?
content :
- <Measure onResize={this.setScaling}>
+ <Measure offset onResize={this.setScaling}>
{({ measureRef }) =>
<div style={{ width: "100%", height: "auto" }} ref={measureRef}>
{content}