From 599d1068636f8c1ba5c899ecdbd03aca7ebc5a0f Mon Sep 17 00:00:00 2001 From: cash Date: Mon, 2 Jan 2012 16:37:45 -0500 Subject: put in a workaround for tags being above the image for managing the hover events --- views/default/js/photos/tagging.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/views/default/js/photos/tagging.php b/views/default/js/photos/tagging.php index 47bab9de5..a3c7efc1c 100644 --- a/views/default/js/photos/tagging.php +++ b/views/default/js/photos/tagging.php @@ -124,8 +124,20 @@ elgg.tidypics.tagging.toggleTagHover = function() { function() { $('.tidypics-tag-wrapper').show(); }, - function() { - $('.tidypics-tag-wrapper').hide(); + function(event) { + // this check handles the tags appearing over the image + var mouseX = event.pageX; + var mouseY = event.pageY; + var offset = $('.tidypics-photo').offset(); + var width = $('.tidypics-photo').outerWidth() - 1; + var height = $('.tidypics-photo').outerHeight() - 1; + + mouseX -= offset.left; + mouseY -= offset.top; + + if (mouseX < 0 || mouseX > width || mouseY < 0 || mouseY > height) { + $('.tidypics-tag-wrapper').hide(); + } } ); } else { -- cgit v1.2.3