diff options
| author | Tyler Schicke <tyler_schicke@brown.edu> | 2019-05-11 22:55:44 -0400 |
|---|---|---|
| committer | Tyler Schicke <tyler_schicke@brown.edu> | 2019-05-11 22:55:44 -0400 |
| commit | 0103346e8bae5113f5ea6f34d2745addac3a192e (patch) | |
| tree | d28a39521298a76682688bf688447e7a1b5604b6 /src/client/views/nodes/VideoBox.tsx | |
| parent | 7da76d2538ebde21d7a878b5096d5a673e5d6375 (diff) | |
Changed measure params that we use
Diffstat (limited to 'src/client/views/nodes/VideoBox.tsx')
| -rw-r--r-- | src/client/views/nodes/VideoBox.tsx | 4 |
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} |
