aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2022-01-27 11:52:47 +0000
committerr <r@freesoftwareextremist.com>2022-01-27 11:52:47 +0000
commit4ef5e0daf285f41850c9ac53b0322d85fbf5eaec (patch)
tree2c0f1c51708e8965a04337ee98faf12e9f046570
parent0b004efffab6775223c7921b099bd50b6e060f3b (diff)
downloadbloat-4ef5e0daf285f41850c9ac53b0322d85fbf5eaec.tar.gz
bloat-4ef5e0daf285f41850c9ac53b0322d85fbf5eaec.zip
Fix null imgPrev in setPos
-rw-r--r--static/fluoride.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/static/fluoride.js b/static/fluoride.js
index 917ffff..6f14f86 100644
--- a/static/fluoride.js
+++ b/static/fluoride.js
@@ -246,11 +246,11 @@ function handleImgPreview(a) {
img.src = e.target.getAttribute("href");
img.style["max-width"] = mw + "px";
img.style["max-height"] = mh + "px";
+ imgPrev = img;
img.onload = function(e2) {
setPos(imgPrev, imgX, imgY, mw, mh);
}
document.body.appendChild(img);
- imgPrev = img;
}
a.onmouseleave = function(e) {
var img = document.getElementById("img-preview");