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

Commit

Permalink
Fixed position bug caused my max/min width reset. Moved it to new cla…
Browse files Browse the repository at this point in the history
…ss and modified calculate method to compensate.
  • Loading branch information
Craga89 committed Dec 8, 2010
1 parent 1e453d9 commit 3964500
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 75 deletions.
15 changes: 9 additions & 6 deletions dist/jquery.qtip.css
Expand Up @@ -9,18 +9,13 @@
* http://en.wikipedia.org/wiki/MIT_License
* http://en.wikipedia.org/wiki/GNU_General_Public_License
*
* Date: Wed Dec 8 14:19:21 2010 +0000
* Date: Wed Dec 8 14:39:35 2010 +0000
*/

.ui-tooltip-accessible{
left: -31000px;
display: block;
visibility: hidden;

max-width: none !important;
min-width: 0px !important;
max-height: none !important;
min-height: 0px !important;
}

/* IE6 ONLY - Width detection fix */
Expand All @@ -29,6 +24,14 @@
float: left !important;
}

/* Accessible fluid class for determining actual width */
.ui-tooltip-accessible-fluid{
max-width: none !important;
min-width: 0px !important;
max-height: none !important;
min-height: 0px !important;
}

.ui-tooltip, .qtip{
position: absolute;
display: none;
Expand Down
11 changes: 7 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: Wed Dec 8 14:19:21 2010 +0000
* Date: Wed Dec 8 14:39:35 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 @@ -194,10 +194,10 @@ function QTip(target, options, id)
return pos;
}

function calculate(detail)
function calculate(detail, fluid)
{
var tooltip = self.elements.tooltip,
accessible = uitooltip + '-accessible',
accessible = uitooltip + '-accessible ' + (fluid ? uitooltip + '-accessible-fluid' : ''),
show = !tooltip.is(':visible'),
returned = FALSE;

Expand Down Expand Up @@ -1059,6 +1059,9 @@ function QTip(target, options, id)
scrollTop: viewport.scrollTop()
};




// Check if mouse was the target
if(target === 'mouse') {
// Force left top to allow flipping
Expand Down Expand Up @@ -1170,7 +1173,7 @@ function QTip(target, options, id)

// Determine actual dimensions using our calculate function
tooltip.css({ width: 'auto', height: 'auto' });
dimensions = calculate('dimensions');
dimensions = calculate('dimensions', 1);

// Determine actual width
$.each(['width', 'height'], function(i, prop) {
Expand Down

0 comments on commit 3964500

Please sign in to comment.