Compare commits

..

No commits in common. "321fe4caa66a86c1fedf86e9cc01ff1f218b18aa" and "d7dcbbd318bd656956eff7ddc04a5d9a4fe81463" have entirely different histories.

View File

@ -23,8 +23,8 @@ const Sidebar = (props) => {
if (pix === undefined) { return <p key={md.name}>Loading...</p>; } if (pix === undefined) { return <p key={md.name}>Loading...</p>; }
let max = binaryMax[md.name]; let max = binaryMax[md.name];
let [w, h] = md.size; let [w, h] = md.size;
let xOff = Math.min(mouseX,w-1); // Math.min(w, Math.max(0, Math.round(x*w))); let xOff = mouseX; // 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 yOff = mouseY; // Math.min(h, Math.max(0, Math.round(y*h)));
let v = pix[xOff+yOff*w]; let v = pix[xOff+yOff*w];
let color = "#fff"; let color = "#fff";
let rgb = ""; let rgb = "";
@ -208,7 +208,7 @@ class App extends React.Component {
images = imageMetadata.map((metadata) => { images = imageMetadata.map((metadata) => {
let {name, ratio, image, size} = metadata; let {name, ratio, image, size} = metadata;
let width = ELEMENT_WIDTH; let width = ELEMENT_WIDTH;
let height = (width/ratio).toFixed(); let height = (ratio * width).toFixed();
let url = ROOT + image + '?t=' + timestamp; let url = ROOT + image + '?t=' + timestamp;
const clamp = (offsetX, offsetY) => { const clamp = (offsetX, offsetY) => {
@ -288,7 +288,7 @@ class App extends React.Component {
onWheel={mouseScroll} onWheel={mouseScroll}
className="frame" className="frame"
style={{backgroundImage: 'url("' + url + '")', ...style}}> style={{backgroundImage: 'url("' + url + '")', ...style}}>
<p className="name"><a href={url}>{name}</a></p> <p className="name">{name}</p>
</div>) </div>)
}); });
let time = moment.unix(timestamp); let time = moment.unix(timestamp);