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

Commit

Permalink
Removed some redundant code from the tips plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Nov 30, 2010
1 parent 56875f4 commit a9dcc3a
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 81 deletions.
2 changes: 1 addition & 1 deletion dist/jquery.qtip.css
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Mon Nov 29 23:33:41 2010 +0000
* Date: Tue Nov 30 01:50:54 2010 +0000
*/

.ui-tooltip-accessible{
Expand Down
11 changes: 4 additions & 7 deletions dist/jquery.qtip.js
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Mon Nov 29 23:33:41 2010 +0000
* Date: Tue Nov 30 01:50:54 2010 +0000
*/

"use strict"; // Enable ECMAScript "strict" operation for this function. See more: http://ejohn.org/blog/ecmascript-5-strict-mode-json-and-more/
Expand Down Expand Up @@ -1809,14 +1809,13 @@ function Tip(qTip, command)
tip.css(corner[precedance], -offset);
}

function reposition(event, api, p, viewport) {
function reposition(event, api, pos, viewport) {
if(!elems.tip) { return; }

var pos = { left: p.left, top: p.top },
newCorner = $.extend({}, self.corner),
var newCorner = $.extend({}, self.corner),
newType = self.mimic.adjust ? $.extend({}, self.mimic) : NULL,
precedance = newCorner.precedance === 'y' ? ['y', 'top', 'left', 'height', 'x'] : ['x', 'left', 'top', 'width', 'y'],
adjusted = p.adjusted,
adjusted = pos.adjusted,
offset = [ parseInt(wrapper.css('border-' + newCorner[ precedance[0] ] + '-width'), 10) || 0, 0 ],
walk = [newCorner, newType];

Expand Down Expand Up @@ -1851,8 +1850,6 @@ function Tip(qTip, command)
cache.left = adjusted.left;
cache.top = adjusted.top;
cache.corner = newCorner;

$.extend(p, pos);
}

$.extend(self, {
Expand Down

0 comments on commit a9dcc3a

Please sign in to comment.