diff options
| author | bob <bcz@cs.brown.edu> | 2019-03-15 10:48:23 -0400 |
|---|---|---|
| committer | bob <bcz@cs.brown.edu> | 2019-03-15 10:48:23 -0400 |
| commit | c17605b4d1fe04429b029ff5a161f31ce19f5fd4 (patch) | |
| tree | 62a824acf6be48014a19f12393c02a72186109c4 /src/client/views/nodes/VideoBox.tsx | |
| parent | b90e4714f44f6e6cb948784d5ea77654c1d164d8 (diff) | |
think video resizing is fixed now.
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 053d9dd56..fef278cec 100644 --- a/src/client/views/nodes/VideoBox.tsx +++ b/src/client/views/nodes/VideoBox.tsx @@ -30,7 +30,7 @@ export class VideoBox extends React.Component<FieldViewProps> { var nativeWidth = this.props.doc.GetNumber(KeyStore.NativeWidth, 0); var nativeHeight = this.props.doc.GetNumber(KeyStore.NativeHeight, 0); var newNativeHeight = nativeWidth * r.entry.height / r.entry.width; - if (newNativeHeight != nativeHeight && !isNaN(newNativeHeight)) { + if (!nativeHeight && newNativeHeight != nativeHeight && !isNaN(newNativeHeight)) { this.props.doc.SetNumber(KeyStore.Height, newNativeHeight / nativeWidth * this.props.doc.GetNumber(KeyStore.Width, 0)); this.props.doc.SetNumber(KeyStore.NativeHeight, newNativeHeight); } @@ -48,7 +48,7 @@ export class VideoBox extends React.Component<FieldViewProps> { //setTimeout(action(() => this._loaded = true), 500); return ( - <div style={{ width: "100%", height: "Auto" }} > + <div style={{ width: "100%", height: "100%" }} > <Measure onResize={this.setScaling}> {({ measureRef }) => <video className="videobox-cont" ref={measureRef}> |
