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

Commit

Permalink
Added reposition finement for centercenter positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Dec 7, 2010
1 parent c6fe343 commit adecf76
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 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 Dec 6 23:22:04 2010 +0000
* Date: Mon Dec 6 23:52:36 2010 +0000
*/

.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: Mon Dec 6 23:22:04 2010 +0000
* Date: Mon Dec 6 23:52:36 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 @@ -1018,7 +1018,7 @@ function QTip(target, options, id)
adjustX = -2 * posOptions.adjust.x,
overflowLeft = viewportScroll - posLeft,
overflowRight = posLeft + elemWidth - viewport.width - viewportScroll,
offset = myWidth - adjustX - (my.precedance === 'x' ? atWidth : 0);
offset = myWidth - adjustX - (my.precedance === 'x' || my.x === my.y ? atWidth : 0);

if(overflowLeft > 0) {
position.left -= offset;
Expand All @@ -1036,7 +1036,7 @@ function QTip(target, options, id)
adjustY = -2 * posOptions.adjust.y,
overflowTop = viewportScroll - posTop,
overflowBottom = posTop + elemHeight - viewport.height - viewportScroll,
offset = myHeight - adjustY - (my.precedance === 'y' ? atHeight : 0);
offset = myHeight - adjustY - (my.precedance === 'y' || my.x === my.y ? atHeight : 0);

if(overflowTop > 0) {
position.top -= offset;
Expand Down
8 changes: 4 additions & 4 deletions dist/jquery.qtip.min.js

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

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

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/core.js
Expand Up @@ -993,7 +993,7 @@ function QTip(target, options, id)
adjustX = -2 * posOptions.adjust.x,
overflowLeft = viewportScroll - posLeft,
overflowRight = posLeft + elemWidth - viewport.width - viewportScroll,
offset = myWidth - adjustX - (my.precedance === 'x' ? atWidth : 0);
offset = myWidth - adjustX - (my.precedance === 'x' || my.x === my.y ? atWidth : 0);

if(overflowLeft > 0) {
position.left -= offset;
Expand All @@ -1011,7 +1011,7 @@ function QTip(target, options, id)
adjustY = -2 * posOptions.adjust.y,
overflowTop = viewportScroll - posTop,
overflowBottom = posTop + elemHeight - viewport.height - viewportScroll,
offset = myHeight - adjustY - (my.precedance === 'y' ? atHeight : 0);
offset = myHeight - adjustY - (my.precedance === 'y' || my.x === my.y ? atHeight : 0);

if(overflowTop > 0) {
position.top -= offset;
Expand Down

0 comments on commit adecf76

Please sign in to comment.