Navigation Menu

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

Commit

Permalink
Fixed regression in tip colour detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed May 9, 2011
1 parent e34e454 commit 5a4c67f
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 38 deletions.
8 changes: 5 additions & 3 deletions dist/jquery.qtip.basic.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 May 9 00:37:46 2011 +0100
* Date: Mon May 9 01:00:42 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 @@ -335,7 +335,9 @@ function QTip(target, options, id, attr)
// If queue is empty after image removal, update tooltip and continue the queue
if((images = images.not(this)).length === 0) {
self.redraw();
self.reposition(cache.event);
if(reposition !== FALSE) {
self.reposition(cache.event);
}

next();
}
Expand Down Expand Up @@ -740,7 +742,7 @@ function QTip(target, options, id, attr)
}

// Set proper rendered flag and update content
updateContent();
updateContent(FALSE, FALSE);
self.rendered = TRUE;

// Setup widget classes
Expand Down
6 changes: 2 additions & 4 deletions 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 May 9 00:37:46 2011 +0100
* Date: Mon May 9 01:00:42 2011 +0100
*/

/* Fluid class for determining actual width in IE */
Expand Down Expand Up @@ -284,9 +284,7 @@
border: 0px dashed transparent;
}

.ui-tooltip .ui-tooltip-tip canvas{ position: static; }

.ui-tooltip .ui-tooltip-tip .qvml{ behavior: url(#default#VML); }#qtip-overlay{
.ui-tooltip .ui-tooltip-tip canvas{ position: static; }#qtip-overlay{
position: absolute;
left: -10000em;
top: -10000em;
Expand Down
23 changes: 11 additions & 12 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 May 9 00:37:46 2011 +0100
* Date: Mon May 9 01:00:42 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 @@ -335,7 +335,9 @@ function QTip(target, options, id, attr)
// If queue is empty after image removal, update tooltip and continue the queue
if((images = images.not(this)).length === 0) {
self.redraw();
self.reposition(cache.event);
if(reposition !== FALSE) {
self.reposition(cache.event);
}

next();
}
Expand Down Expand Up @@ -740,7 +742,7 @@ function QTip(target, options, id, attr)
}

// Set proper rendered flag and update content
updateContent();
updateContent(FALSE, FALSE);
self.rendered = TRUE;

// Setup widget classes
Expand Down Expand Up @@ -2235,8 +2237,8 @@ function Tip(qTip, command)
tooltip.addClass(fluid);

// Detect tip colours from CSS styles
fill = tip.css(backgroundColor);
border = tip[0].style[ borderSideCamel ] || tooltip.css(borderSide);
color.fill = fill = tip.css(backgroundColor);
color.border = border = tip[0].style[ borderSideCamel ] || tooltip.css(borderSide);

// Make sure colours are valid
if(!fill || invalid.test(fill)) {
Expand All @@ -2245,13 +2247,10 @@ function Tip(qTip, command)
color.fill = tooltip.css(backgroundColor) || fill;
}
}
if(!border || invalid.test(border)) {
color.border = tooltip.css(borderSide) || transparent;
if(invalid.test(color.border) || color.border === bodyBorder) {
color.border = colorElem.css(borderSide) || transparent;
if(color.border === contentColour || invalid.test(color.border)) {
color.border = border;
}
if(!border || invalid.test(border) || border === bodyBorder) {
color.border = colorElem.css(borderSide) || transparent;
if(invalid.test(color.border) || color.border === contentColour) {
color.border = transparent;
}
}

Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.qtip.min.css

Large diffs are not rendered by default.

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.

6 changes: 4 additions & 2 deletions src/core.js
Expand Up @@ -298,7 +298,9 @@ function QTip(target, options, id, attr)
// If queue is empty after image removal, update tooltip and continue the queue
if((images = images.not(this)).length === 0) {
self.redraw();
self.reposition(cache.event);
if(reposition !== FALSE) {
self.reposition(cache.event);
}

next();
}
Expand Down Expand Up @@ -703,7 +705,7 @@ function QTip(target, options, id, attr)
}

// Set proper rendered flag and update content
updateContent();
updateContent(FALSE, FALSE);
self.rendered = TRUE;

// Setup widget classes
Expand Down
4 changes: 1 addition & 3 deletions src/tips.css
Expand Up @@ -19,6 +19,4 @@
border: 0px dashed transparent;
}

.ui-tooltip .ui-tooltip-tip canvas{ position: static; }

.ui-tooltip .ui-tooltip-tip .qvml{ behavior: url(#default#VML); }
.ui-tooltip .ui-tooltip-tip canvas{ position: static; }
15 changes: 6 additions & 9 deletions src/tips.js
Expand Up @@ -284,8 +284,8 @@ function Tip(qTip, command)
tooltip.addClass(fluid);

// Detect tip colours from CSS styles
fill = tip.css(backgroundColor);
border = tip[0].style[ borderSideCamel ] || tooltip.css(borderSide);
color.fill = fill = tip.css(backgroundColor);
color.border = border = tip[0].style[ borderSideCamel ] || tooltip.css(borderSide);

// Make sure colours are valid
if(!fill || invalid.test(fill)) {
Expand All @@ -294,13 +294,10 @@ function Tip(qTip, command)
color.fill = tooltip.css(backgroundColor) || fill;
}
}
if(!border || invalid.test(border)) {
color.border = tooltip.css(borderSide) || transparent;
if(invalid.test(color.border) || color.border === bodyBorder) {
color.border = colorElem.css(borderSide) || transparent;
if(color.border === contentColour || invalid.test(color.border)) {
color.border = border;
}
if(!border || invalid.test(border) || border === bodyBorder) {
color.border = colorElem.css(borderSide) || transparent;
if(invalid.test(color.border) || color.border === contentColour) {
color.border = transparent;
}
}

Expand Down

0 comments on commit 5a4c67f

Please sign in to comment.