summaryrefslogtreecommitdiff
path: root/lib/gallery.common.js
diff options
context:
space:
mode:
authorshadlaws <shad@shadlaws.com>2013-02-28 17:10:48 +0100
committershadlaws <shad@shadlaws.com>2013-02-28 17:10:48 +0100
commitef2ca6edb572501145ec3a4d6aa529118081188a (patch)
tree17ba4f58e5dc090a605125538063f16fc0103a42 /lib/gallery.common.js
parent8cec774bf9e2a5a5786107777754446a8166242e (diff)
#2018 follow-on and #2023 - Fixed issues with thumb hover effects.
- cleaned up resize after hover: more efficient, totally browser-compatible (IE7-10, FF, Chrome tested!). - cleaned up resize on hover: more efficient, fixed bug with neighbors that are bigger but only by a little. - fixed bugs when moving off item with expanded context menu and then quickly back: oversized hover, flicker. - cleaned up formatting, removed unneeded code, and added comments.
Diffstat (limited to 'lib/gallery.common.js')
-rw-r--r--lib/gallery.common.js6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js
index fa11aeb9..c3d1362c 100644
--- a/lib/gallery.common.js
+++ b/lib/gallery.common.js
@@ -144,11 +144,13 @@
list.hide();
hover_target.hover(
+ // The stop arguments below ensure that when we leave an item with an expanded context
+ // menu then *quickly* come back, we neither freeze mid-slide nor flicker.
function() {
- list.stop(true, true).slideDown("fast");
+ list.stop(false, true).slideDown("fast");
},
function() {
- list.stop(true, true).slideUp("slow");
+ list.stop(true, false).slideUp("slow");
}
);