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

Commit

Permalink
Boundary fix for adjust.method 'shift'
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Apr 26, 2011
1 parent 8e40228 commit b69e978
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 10 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: Tue Apr 26 14:21:13 2011 +0100
* Date: Tue Apr 26 14:33:26 2011 +0100
*/

/* Fluid class for determining actual width in IE */
Expand Down
14 changes: 11 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: Tue Apr 26 14:21:13 2011 +0100
* Date: Tue Apr 26 14:33:26 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 @@ -1097,7 +1097,11 @@ function QTip(target, options, id, attr)
position.left = Math.max(
viewport.offset.left + (tipAdjust && tip.x === 'center' ? readjust.tip.offset : 0),
posLeft - offset,
Math.min( posLeft + offset, position.left )
Math.min(
viewport.offset.left + viewport.width,
posLeft + offset,
position.left
)
);
}

Expand Down Expand Up @@ -1139,7 +1143,11 @@ function QTip(target, options, id, attr)
position.top = Math.max(
viewport.offset.top + (tipAdjust && tip.x === 'center' ? readjust.tip.offset : 0),
posTop - offset,
Math.min( posTop + offset, position.top )
Math.min(
viewport.offset.top + viewport.height,
posTop + offset,
position.top
)
);
}

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.

12 changes: 10 additions & 2 deletions src/core.js
Expand Up @@ -1054,7 +1054,11 @@ function QTip(target, options, id, attr)
position.left = Math.max(
viewport.offset.left + (tipAdjust && tip.x === 'center' ? readjust.tip.offset : 0),
posLeft - offset,
Math.min( posLeft + offset, position.left )
Math.min(
viewport.offset.left + viewport.width,
posLeft + offset,
position.left
)
);
}

Expand Down Expand Up @@ -1096,7 +1100,11 @@ function QTip(target, options, id, attr)
position.top = Math.max(
viewport.offset.top + (tipAdjust && tip.x === 'center' ? readjust.tip.offset : 0),
posTop - offset,
Math.min( posTop + offset, position.top )
Math.min(
viewport.offset.top + viewport.height,
posTop + offset,
position.top
)
);
}

Expand Down

0 comments on commit b69e978

Please sign in to comment.