Skip to content
This repository has been archived by the owner on Jun 14, 2020. It is now read-only.

Commit

Permalink
Optimized bgiframe code
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Jul 22, 2010
1 parent 080f23c commit d6087ce
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/bgiframe.js
Expand Up @@ -25,16 +25,17 @@ function BGIFrame(qTip)
adjust: function()
{
var dimensions = qTip.calculate('dimensions'), // Determine current tooltip dimensions
tip = qTip.plugins.tip,
tipAdjust, offset;

// Adjust border offset
offset = parseInt(tooltip.css('border-left-width'), 10);
offset = { left: -offset, top: -offset };

// Adjust for tips plugin
if(qTip.plugins.tip && qTip.plugins.tip.tip) {
tipAdjust = (qTip.plugins.tip.corner.precedance === 'x') ? ['width', 'left'] : ['height', 'top'];
offset[ tipAdjust[1] ] -= qTip.plugins.tip.tip[ tipAdjust[0] ]();
if(tip && tip.tip) {
tipAdjust = (tip.corner.precedance === 'x') ? ['width', 'left'] : ['height', 'top'];
offset[ tipAdjust[1] ] -= tip.tip[ tipAdjust[0] ]();
}

// Update bgiframe
Expand Down

0 comments on commit d6087ce

Please sign in to comment.