[geeklog-cvs] geeklog: Don't retreive the viewport size for each tooltip

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Mon Apr 23 13:43:01 EDT 2012


changeset 8605:c4c6787baad3
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/c4c6787baad3
user: Rouslan Placella <rouslan at placella.com>
date: Mon Apr 23 18:42:43 2012 +0100
description:
Don't retreive the viewport size for each tooltip

diffstat:

public_html/javascript/fix_tooltips.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)

diffs (18 lines):

diff -r dada05973cc5 -r c4c6787baad3 public_html/javascript/fix_tooltips.js
--- a/public_html/javascript/fix_tooltips.js Mon Apr 23 18:40:30 2012 +0100
+++ b/public_html/javascript/fix_tooltips.js Mon Apr 23 18:42:43 2012 +0100
@@ -1,11 +1,11 @@
/* Prevents the tooltips from disappearing outside the viewport */
var fix_tooltips = function() {
var $w = $(window);
+ // size of the viewport
+ var viewport_height = parseInt($w.height());
+ var viewport_width = parseInt($w.width());
// fix each tooltip
$('a.gl-tooltip').each(function() {
- // size of the viewport
- var viewport_height = parseInt($w.height());
- var viewport_width = parseInt($w.width());
// cache the tooltip element
var $s = $(this).find('span');
// estimate the bottom and right coordinates of the tooltip


More information about the geeklog-cvs mailing list