Compare commits
2 Commits
d7dcbbd318
...
321fe4caa6
| Author | SHA1 | Date | |
|---|---|---|---|
| 321fe4caa6 | |||
| 1f5a377194 |
@ -23,8 +23,8 @@ const Sidebar = (props) => {
|
||||
if (pix === undefined) { return <p key={md.name}>Loading...</p>; }
|
||||
let max = binaryMax[md.name];
|
||||
let [w, h] = md.size;
|
||||
let xOff = mouseX; // Math.min(w, Math.max(0, Math.round(x*w)));
|
||||
let yOff = mouseY; // Math.min(h, Math.max(0, Math.round(y*h)));
|
||||
let xOff = Math.min(mouseX,w-1); // Math.min(w, Math.max(0, Math.round(x*w)));
|
||||
let yOff = Math.min(mouseY,h-1); // Math.min(h, Math.max(0, Math.round(y*h)));
|
||||
let v = pix[xOff+yOff*w];
|
||||
let color = "#fff";
|
||||
let rgb = "";
|
||||
@ -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