diff --git a/src/App.js b/src/App.js index 8ddc45d..92e693d 100644 --- a/src/App.js +++ b/src/App.js @@ -23,8 +23,8 @@ const Sidebar = (props) => { if (pix === undefined) { return
Loading...
; } 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 = "";