aboutsummaryrefslogtreecommitdiff
path: root/views
diff options
context:
space:
mode:
authorcash <cash.costello@gmail.com>2012-01-02 16:37:45 -0500
committercash <cash.costello@gmail.com>2012-01-02 16:37:45 -0500
commit599d1068636f8c1ba5c899ecdbd03aca7ebc5a0f (patch)
treeee7ab4317baaf817b2ed55afb3b706b5a6660aba /views
parent9e54d3a4c5274b235a29de9a00e967695024d8e1 (diff)
downloadelgg-599d1068636f8c1ba5c899ecdbd03aca7ebc5a0f.tar.gz
elgg-599d1068636f8c1ba5c899ecdbd03aca7ebc5a0f.tar.bz2
put in a workaround for tags being above the image for managing the hover events
Diffstat (limited to 'views')
-rw-r--r--views/default/js/photos/tagging.php16
1 files 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 {