summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChad Kieffer <ckieffer@gmail.com>2009-08-23 14:58:26 -0600
committerChad Kieffer <ckieffer@gmail.com>2009-08-23 14:58:26 -0600
commit457708311a466d8b116d5b28575be1bc3baad864 (patch)
tree56ca39c8afcc89dab951fb9dd1544265756309b4 /lib
parent7d36f43d0bf3ab8765820b9496a41f2f75ca85c4 (diff)
Cut down on jittering of the context menu on open on resize view.
Diffstat (limited to 'lib')
-rw-r--r--lib/gallery.common.js12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/gallery.common.js b/lib/gallery.common.js
index 06775d79..16cb7ea2 100644
--- a/lib/gallery.common.js
+++ b/lib/gallery.common.js
@@ -112,15 +112,19 @@
};
$.fn.gallery_context_menu = function() {
+ var in_progress = 0;
+ $(".gContextMenu *").removeAttr('title');
$(".gContextMenu ul").hide();
$(".gContextMenu").hover(
function() {
- $(this).find("ul").slideDown("fast");
- $(this).find(".gDialogLink").gallery_dialog();
- $(this).find(".gAjaxLink").gallery_ajax();
+ if (in_progress == 0) {
+ $(this).find("ul").slideDown("fast", function() { in_progress = 1; });
+ $(this).find(".gDialogLink").gallery_dialog();
+ $(this).find(".gAjaxLink").gallery_ajax();
+ }
},
function() {
- $(this).find("ul").slideUp("slow");
+ $(this).find("ul").slideUp("slow", function() { in_progress = 0; });
}
);
};