From 321fe4caa66a86c1fedf86e9cc01ff1f218b18aa Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Thu, 16 Feb 2023 19:29:55 -0800 Subject: [PATCH] Fix aspect ratio. --- src/App.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/App.js b/src/App.js index 92e693d..bcbf3da 100644 --- a/src/App.js +++ b/src/App.js @@ -208,7 +208,7 @@ class App extends React.Component { images = imageMetadata.map((metadata) => { let {name, ratio, image, size} = metadata; let width = ELEMENT_WIDTH; - let height = (ratio * width).toFixed(); + let height = (width/ratio).toFixed(); let url = ROOT + image + '?t=' + timestamp; const clamp = (offsetX, offsetY) => { @@ -288,7 +288,7 @@ class App extends React.Component { onWheel={mouseScroll} className="frame" style={{backgroundImage: 'url("' + url + '")', ...style}}> -

{name}

+

{name}

) }); let time = moment.unix(timestamp);