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

Commit

Permalink
Fixed reposition problem when accounting for tip dimensions
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Apr 25, 2011
1 parent 22f0781 commit fa4e97c
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
1 change: 0 additions & 1 deletion dist/comment

This file was deleted.

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 Apr 25 15:37:08 2011 +0100
* Date: Mon Apr 25 16:09:18 2011 +0100
*/

/* Fluid class for determining actual width in IE */
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 Apr 25 15:37:08 2011 +0100
* Date: Mon Apr 25 16:09:18 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 @@ -1080,7 +1080,7 @@ function QTip(target, options, id, attr)
var viewportScroll = viewport.offset.left + viewport.scrollLeft,
myWidth = my.x === 'left' ? elemWidth : my.x === 'right' ? -elemWidth : -elemWidth / 2,
atWidth = at.x === 'left' ? targetWidth : at.x === 'right' ? -targetWidth : -targetWidth / 2,
tipAdjust = tip && tip.precedance === 'y' ? readjust.tip.width + readjust.tip.border * 2 : 0,
tipAdjust = tip && tip.precedance === 'x' ? readjust.tip.width + readjust.tip.border * 2: 0,
overflowLeft = viewportScroll - posLeft - tipAdjust,
overflowRight = posLeft + elemWidth - viewport.width - viewportScroll + tipAdjust,
offset = myWidth - (my.precedance === 'x' || my.x === my.y ? atWidth : 0),
Expand Down Expand Up @@ -1117,7 +1117,7 @@ function QTip(target, options, id, attr)
var viewportScroll = viewport.offset.top + viewport.scrollTop,
myHeight = my.y === 'top' ? elemHeight : my.y === 'bottom' ? -elemHeight : -elemHeight / 2,
atHeight = at.y === 'top' ? targetHeight : at.y === 'bottom' ? -targetHeight : -targetHeight / 2,
tipAdjust = tip && tip.precedance === 'x' ? readjust.tip.height + readjust.tip.border * 2 : 0,
tipAdjust = tip && tip.precedance === 'y' ? readjust.tip.height + readjust.tip.border * 2 : 0,
overflowTop = viewportScroll - posTop - tipAdjust,
overflowBottom = posTop + elemHeight - viewport.height - viewportScroll + tipAdjust,
offset = myHeight - (my.precedance === 'y' || my.x === my.y ? atHeight : 0),
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.

4 changes: 2 additions & 2 deletions src/core.js
Expand Up @@ -1037,7 +1037,7 @@ function QTip(target, options, id, attr)
var viewportScroll = viewport.offset.left + viewport.scrollLeft,
myWidth = my.x === 'left' ? elemWidth : my.x === 'right' ? -elemWidth : -elemWidth / 2,
atWidth = at.x === 'left' ? targetWidth : at.x === 'right' ? -targetWidth : -targetWidth / 2,
tipAdjust = tip && tip.precedance === 'y' ? readjust.tip.width + readjust.tip.border * 2 : 0,
tipAdjust = tip && tip.precedance === 'x' ? readjust.tip.width + readjust.tip.border * 2: 0,
overflowLeft = viewportScroll - posLeft - tipAdjust,
overflowRight = posLeft + elemWidth - viewport.width - viewportScroll + tipAdjust,
offset = myWidth - (my.precedance === 'x' || my.x === my.y ? atWidth : 0),
Expand Down Expand Up @@ -1074,7 +1074,7 @@ function QTip(target, options, id, attr)
var viewportScroll = viewport.offset.top + viewport.scrollTop,
myHeight = my.y === 'top' ? elemHeight : my.y === 'bottom' ? -elemHeight : -elemHeight / 2,
atHeight = at.y === 'top' ? targetHeight : at.y === 'bottom' ? -targetHeight : -targetHeight / 2,
tipAdjust = tip && tip.precedance === 'x' ? readjust.tip.height + readjust.tip.border * 2 : 0,
tipAdjust = tip && tip.precedance === 'y' ? readjust.tip.height + readjust.tip.border * 2 : 0,
overflowTop = viewportScroll - posTop - tipAdjust,
overflowBottom = posTop + elemHeight - viewport.height - viewportScroll + tipAdjust,
offset = myHeight - (my.precedance === 'y' || my.x === my.y ? atHeight : 0),
Expand Down

0 comments on commit fa4e97c

Please sign in to comment.