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

Commit

Permalink
Disabled screen positioning when using window/document as position ta…
Browse files Browse the repository at this point in the history
…rget
  • Loading branch information
Craga89 committed Aug 28, 2010
1 parent 1ab006c commit 1a8fa6b
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 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: Sat Aug 28 22:34:19 2010 +0100
* Date: Sat Aug 28 22:35:21 2010 +0100
*/

.ui-tooltip-accessible{
Expand Down
6 changes: 3 additions & 3 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: Sat Aug 28 22:34:19 2010 +0100
* Date: Sat Aug 28 22:35:21 2010 +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 @@ -859,7 +859,7 @@ function QTip(target, options, id)
callback = $.Event('tooltipmove'),
adjust = {
left: function(posLeft) {
var targetLeft = target === 'mouse' ? event.pageX : target[0] === window ? 0 : target.offset().left,
var targetLeft = target === 'mouse' ? event.pageX : target.offset().left,
winScroll = $(window).scrollLeft(),
winWidth = $(window).width(),
myOffset = my.x === 'left' ? -elemWidth : my.x === 'right' ? elemWidth : elemWidth / 2,
Expand Down Expand Up @@ -963,7 +963,7 @@ function QTip(target, options, id)
position.top += posOptions.adjust.y + (my.y === 'bottom' ? -elemHeight : my.y === 'center' ? -elemHeight / 2 : 0);

// Calculate collision offset values
if(posOptions.adjust.screen) {
if(posOptions.adjust.screen && target[0] !== window && target[0] !== document.body) {
position.adjusted = { left: adjust.left(position.left), top: adjust.top(position.top) };
}
else {
Expand Down
12 changes: 6 additions & 6 deletions dist/jquery.qtip.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1a8fa6b

Please sign in to comment.