Fix aspect ratio.
This commit is contained in:
parent
1f5a377194
commit
321fe4caa6
@ -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}}>
|
||||
<p className="name">{name}</p>
|
||||
<p className="name"><a href={url}>{name}</a></p>
|
||||
</div>)
|
||||
});
|
||||
let time = moment.unix(timestamp);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user