Refine image zoom functionality to skip small icons and enhance hover overlay
This commit is contained in:
1 parent
8831026024
commit
f54c05bfbb
2 files changed
+5
-2
No files matched your search
@@ -369,7 +369,10 @@
|
||||
}
|
||||
|
||||
Array.prototype.forEach.call(images, function (el) {
|
||||
// Wrap in a span so CSS can attach the hover badge via ::after
|
||||
// Skip icons / tiny images — not worth zooming
|
||||
if (el.offsetWidth < 80 && el.offsetHeight < 80) return;
|
||||
|
||||
// Wrap in a span so CSS can attach the hover overlay via ::after
|
||||
var wrap = document.createElement('span');
|
||||
wrap.className = 'zoomable-wrap';
|
||||
el.parentNode.insertBefore(wrap, el);
|
||||
|
||||
Reference in new issue
Block a user