From: Trevor Parscal Date: Mon, 6 Dec 2010 21:02:11 +0000 (+0000) Subject: Added center option - will pass this upstream. X-Git-Tag: 1.31.0-rc.0~33507 X-Git-Url: http://git.cyclocoop.org/%7B%7B%20url_for%28%27admin_vote_add%27%29%20%7D%7D?a=commitdiff_plain;h=048ef180bc30bbc3bc437150418200611fd2a857;p=lhc%2Fweb%2Fwiklou.git Added center option - will pass this upstream. --- diff --git a/resources/jquery.tipsy/jquery.tipsy.js b/resources/jquery.tipsy/jquery.tipsy.js index 4a276e44c8..847a527bec 100644 --- a/resources/jquery.tipsy/jquery.tipsy.js +++ b/resources/jquery.tipsy/jquery.tipsy.js @@ -56,9 +56,17 @@ if (gravity.length == 2) { if (gravity.charAt(1) == 'w') { - tp.left = pos.left + pos.width / 2 - 15; + if ( this.options.center ) { + tp.left = pos.left + pos.width / 2 - 15; + } else { + tp.left = pos.left; + } } else { - tp.left = pos.left + pos.width / 2 - actualWidth + 15; + if ( this.options.center ) { + tp.left = pos.left + pos.width / 2 - actualWidth + 15; + } else { + tp.left = pos.left + pos.width; + } } } @@ -171,6 +179,7 @@ fade: true, fallback: '', gravity: 'n', + center: true, html: false, live: false, offset: 0,