diff options
| author | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-10-19 00:59:06 +0530 |
|---|---|---|
| committer | usodhi <61431818+usodhi@users.noreply.github.com> | 2020-10-19 00:59:06 +0530 |
| commit | 5df1acbe0f5ce9fe00868e724f5c30fd9775c4bd (patch) | |
| tree | 16918105f01093e26a9472430a9966e16a81e55a /src/client/views/collections/CollectionSchemaCells.tsx | |
| parent | cf1d27d35864915ea67050297e1c888aa0f81709 (diff) | |
| parent | 37fc6beb4662be195b8aa551cc1042b04f2c24a8 (diff) | |
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into restored_server_monitor
Diffstat (limited to 'src/client/views/collections/CollectionSchemaCells.tsx')
| -rw-r--r-- | src/client/views/collections/CollectionSchemaCells.tsx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/views/collections/CollectionSchemaCells.tsx b/src/client/views/collections/CollectionSchemaCells.tsx index 2896a8243..0b3dfe1e4 100644 --- a/src/client/views/collections/CollectionSchemaCells.tsx +++ b/src/client/views/collections/CollectionSchemaCells.tsx @@ -398,10 +398,10 @@ export class CollectionSchemaImageCell extends CollectionSchemaCell { const paths = field ? [this.choosePath(field.url), ...altpaths] : altpaths; const url = paths.length ? paths : [Utils.CorsProxy("http://www.cs.brown.edu/~bcz/noImage.png")]; - const heightToWidth = NumCast(this._rowDoc._nativeHeight) / NumCast(this._rowDoc._nativeWidth); + const aspect = Doc.NativeAspect(this._rowDoc); let width = Math.min(75, this.props.rowProps.width); - const height = Math.min(75, width * heightToWidth); - width = height / heightToWidth; + const height = Math.min(75, width / aspect); + width = height * aspect; const reference = React.createRef<HTMLDivElement>(); return <div className="collectionSchemaView-cellWrapper" ref={this._focusRef} tabIndex={-1} onPointerDown={this.onPointerDown}> |
