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

Commit

Permalink
Fixed positioning animation bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Apr 12, 2011
1 parent 67fc37a commit 5e34916
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 16 deletions.
7 changes: 3 additions & 4 deletions dist/jquery.qtip.basic.js
Expand Up @@ -9,7 +9,7 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Tue Apr 12 00:17:35 2011 +0100
* Date: Tue Apr 12 00:30:03 2011 +0100
*/

"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 @@ -1118,7 +1118,6 @@ function QTip(target, options, id, attr)
return position.top - posTop;
}
};
effect = effect === undefined || !!effect;

// Cache our viewport details
viewport = !viewport ? FALSE : {
Expand Down Expand Up @@ -1220,8 +1219,8 @@ function QTip(target, options, id, attr)
if(callback.isDefaultPrevented()){ return self; }
delete position.adjusted;

// If effect is disabled or positioning gives NaN out, set CSS directly
if(!effect || !isNaN(position.left) || !isNaN(position.top)) {
// If effect is disabled, no animation is defined or positioning gives NaN out, set CSS directly
if(effect === FALSE || isNaN(position.left) || isNaN(position.top) || !$.isFunction(posOptions.effect)) {
tooltip.css(position);
}

Expand Down
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: Tue Apr 12 00:17:35 2011 +0100
* Date: Tue Apr 12 00:30:03 2011 +0100
*/

/* Fluid class for determining actual width in IE */
Expand Down
7 changes: 3 additions & 4 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: Tue Apr 12 00:17:35 2011 +0100
* Date: Tue Apr 12 00:30:03 2011 +0100
*/

"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 @@ -1118,7 +1118,6 @@ function QTip(target, options, id, attr)
return position.top - posTop;
}
};
effect = effect === undefined || !!effect;

// Cache our viewport details
viewport = !viewport ? FALSE : {
Expand Down Expand Up @@ -1220,8 +1219,8 @@ function QTip(target, options, id, attr)
if(callback.isDefaultPrevented()){ return self; }
delete position.adjusted;

// If effect is disabled or positioning gives NaN out, set CSS directly
if(!effect || !isNaN(position.left) || !isNaN(position.top)) {
// If effect is disabled, no animation is defined or positioning gives NaN out, set CSS directly
if(effect === FALSE || isNaN(position.left) || isNaN(position.top) || !$.isFunction(posOptions.effect)) {
tooltip.css(position);
}

Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.qtip.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/jquery.qtip.pack.js

Large diffs are not rendered by default.

5 changes: 2 additions & 3 deletions src/core.js
Expand Up @@ -1076,7 +1076,6 @@ function QTip(target, options, id, attr)
return position.top - posTop;
}
};
effect = effect === undefined || !!effect;

// Cache our viewport details
viewport = !viewport ? FALSE : {
Expand Down Expand Up @@ -1178,8 +1177,8 @@ function QTip(target, options, id, attr)
if(callback.isDefaultPrevented()){ return self; }
delete position.adjusted;

// If effect is disabled or positioning gives NaN out, set CSS directly
if(!effect || !isNaN(position.left) || !isNaN(position.top)) {
// If effect is disabled, no animation is defined or positioning gives NaN out, set CSS directly
if(effect === FALSE || isNaN(position.left) || isNaN(position.top) || !$.isFunction(posOptions.effect)) {
tooltip.css(position);
}

Expand Down

0 comments on commit 5e34916

Please sign in to comment.