[extensions-web] js: Revert to the old tipsy
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [extensions-web] js: Revert to the old tipsy
- Date: Tue, 14 Feb 2012 18:14:43 +0000 (UTC)
commit c2a79101568e4c41700e350de9d9964231011c04
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Feb 14 12:30:44 2012 -0500
js: Revert to the old tipsy
With the out of date indicator gone, we no longer have a need for
center gravity.
sweettooth/static/js/jquery.tipsy.js | 36 +--------------------------------
1 files changed, 2 insertions(+), 34 deletions(-)
---
diff --git a/sweettooth/static/js/jquery.tipsy.js b/sweettooth/static/js/jquery.tipsy.js
index ef4fcbf..9567ed3 100644
--- a/sweettooth/static/js/jquery.tipsy.js
+++ b/sweettooth/static/js/jquery.tipsy.js
@@ -49,9 +49,6 @@
case 'w':
tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width + this.options.offset};
break;
- case 'c':
- tp = {top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width / 2 - actualWidth / 2};
- break;
}
if (gravity.length == 2) {
@@ -145,33 +142,8 @@
return tipsy;
}
- // When we have center gravity, we don't want to show/hide
- // the tip when the user hovers over it. Detect whether
- // the user moved from the element to the tip (on mouseleave)
- // or whether/ the user moved from the tip to the element (on
- // mouseenter).
- function centerGravityMagic(e, tipsy) {
- if (options.gravity !== 'c')
- return false;
-
- if (e.relatedTarget === null)
- return false;
-
- if (e.relatedTarget === tipsy.tip()[0])
- return true;
-
- if (tipsy.tip().has(e.relatedTarget).length)
- return true;
-
- return false;
- }
-
- function enter(e) {
+ function enter() {
var tipsy = get(this);
-
- if (centerGravityMagic(e, tipsy))
- return false;
-
tipsy.hoverState = 'in';
if (options.delayIn == 0) {
tipsy.show();
@@ -181,12 +153,8 @@
}
};
- function leave(e) {
+ function leave() {
var tipsy = get(this);
-
- if (centerGravityMagic(e, tipsy))
- return false;
-
tipsy.hoverState = 'out';
if (options.delayOut == 0) {
tipsy.hide();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]