diff options
| author | bobzel <zzzman@gmail.com> | 2020-10-17 17:45:10 -0400 |
|---|---|---|
| committer | bobzel <zzzman@gmail.com> | 2020-10-17 17:45:10 -0400 |
| commit | 223262242f7db021c8449e920645892cc5ed2820 (patch) | |
| tree | 96bee1cd2d3070028dae8dbeab340b82d6748c34 /src/client/views/collections/CollectionSchemaCells.tsx | |
| parent | 5816840af60f97a34318a52a5276482cab392496 (diff) | |
major rewrite of native width/height/aspect. Fixed scaling of text note sidebars.
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}> |
