fix: hover drives the main preview again when nothing is locked

the peek column only makes sense as an alternative to disturbing an existing lock — with nothing locked, hover had stopped updating anything at all, leaving whatever was last locked stuck on screen while browsing other rows. now: locked -> hover drives the peek column only; unlocked -> hover drives the main preview directly, same as before locking existed.
This commit is contained in:
kgva CMS
2026-08-14 23:15:43 +00:00
parent 7f6bedebdc
commit 4aae68d836
+3 -1
View File
@@ -110,7 +110,9 @@
// actually navigates. // actually navigates.
var isProjectLink = a.hasAttribute("href") && a.hasAttribute("data-img"); var isProjectLink = a.hasAttribute("href") && a.hasAttribute("data-img");
a.addEventListener("mouseenter", function () { a.addEventListener("mouseenter", function () {
if (locked >= 0 && i !== locked) showPeek(a); else hidePeek(); if (locked < 0) { hidePeek(); render(i); } // nothing locked — hover drives the main preview, like before locking existed
else if (i !== locked) showPeek(a);
else hidePeek();
}); });
a.addEventListener("click", function (e) { a.addEventListener("click", function (e) {
if (isProjectLink) { if (isProjectLink) {