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

Commit

Permalink
Check for ownerSVGElement instead of xmlbase, more reliable
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Nov 28, 2012
1 parent e084761 commit e207e47
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dist/basic/jquery.qtip.css
@@ -1,4 +1,4 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0pre - 2012-11-20
/*! qTip2 - Pretty powerful tooltips - v2.0.0pre - 2012-11-28
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */

Expand Down
6 changes: 3 additions & 3 deletions dist/basic/jquery.qtip.js
@@ -1,4 +1,4 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0pre - 2012-11-20
/*! qTip2 - Pretty powerful tooltips - v2.0.0pre - 2012-11-28
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */

Expand Down Expand Up @@ -1194,7 +1194,7 @@ function QTip(target, options, id, attr)
else if(PLUGINS.imagemap && target.is('area')) {
adjusted = PLUGINS.imagemap(self, target, at, PLUGINS.viewport ? method : FALSE);
}
else if(PLUGINS.svg && typeof target[0].xmlbase === 'string') {
else if(PLUGINS.svg && target[0].ownerSVGElement) {
adjusted = PLUGINS.svg(self, target, at, PLUGINS.viewport ? method : FALSE);
}

Expand Down Expand Up @@ -1713,7 +1713,7 @@ if(!$.ui) {
}

// Set global qTip properties
QTIP.version = '2.0.0pre-nightly-6a1900df60';
QTIP.version = '2.0.0pre-nightly-f3fefe0e24';
QTIP.nextid = 0;
QTIP.inactiveEvents = 'click dblclick mousedown mouseup mousemove mouseleave mouseenter'.split(' ');
QTIP.zindex = 15000;
Expand Down
2 changes: 1 addition & 1 deletion dist/basic/jquery.qtip.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/jquery.qtip.css
@@ -1,4 +1,4 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0pre - 2012-11-20
/*! qTip2 - Pretty powerful tooltips - v2.0.0pre - 2012-11-28
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */

Expand Down
8 changes: 5 additions & 3 deletions dist/jquery.qtip.js
@@ -1,4 +1,4 @@
/*! qTip2 - Pretty powerful tooltips - v2.0.0pre - 2012-11-20
/*! qTip2 - Pretty powerful tooltips - v2.0.0pre - 2012-11-28
* http://craigsworks.com/projects/qtip2/
* Copyright (c) 2012 Craig Michael Thompson; Licensed MIT, GPL */

Expand Down Expand Up @@ -1194,7 +1194,7 @@ function QTip(target, options, id, attr)
else if(PLUGINS.imagemap && target.is('area')) {
adjusted = PLUGINS.imagemap(self, target, at, PLUGINS.viewport ? method : FALSE);
}
else if(PLUGINS.svg && typeof target[0].xmlbase === 'string') {
else if(PLUGINS.svg && target[0].ownerSVGElement) {
adjusted = PLUGINS.svg(self, target, at, PLUGINS.viewport ? method : FALSE);
}

Expand Down Expand Up @@ -1713,7 +1713,7 @@ if(!$.ui) {
}

// Set global qTip properties
QTIP.version = '2.0.0pre-nightly-6a1900df60';
QTIP.version = '2.0.0pre-nightly-f3fefe0e24';
QTIP.nextid = 0;
QTIP.inactiveEvents = 'click dblclick mousedown mouseup mousemove mouseleave mouseenter'.split(' ');
QTIP.zindex = 15000;
Expand Down Expand Up @@ -1824,6 +1824,8 @@ PLUGINS.svg = function(api, svg, corner, adjustMethod)
result.position.left = tPoint.x;
result.position.top = tPoint.y;

console.log(result, point, tPoint);

// Adjust width and height
point.x += box.width;
point.y += box.height;
Expand Down
2 changes: 1 addition & 1 deletion dist/jquery.qtip.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/core.js
Expand Up @@ -1139,7 +1139,7 @@ function QTip(target, options, id, attr)
else if(PLUGINS.imagemap && target.is('area')) {
adjusted = PLUGINS.imagemap(self, target, at, PLUGINS.viewport ? method : FALSE);
}
else if(PLUGINS.svg && typeof target[0].xmlbase === 'string') {
else if(PLUGINS.svg && target[0].ownerSVGElement) {
adjusted = PLUGINS.svg(self, target, at, PLUGINS.viewport ? method : FALSE);
}

Expand Down
2 changes: 2 additions & 0 deletions src/svg/svg.js
Expand Up @@ -30,6 +30,8 @@ PLUGINS.svg = function(api, svg, corner, adjustMethod)
result.position.left = tPoint.x;
result.position.top = tPoint.y;

console.log(result, point, tPoint);

// Adjust width and height
point.x += box.width;
point.y += box.height;
Expand Down

0 comments on commit e207e47

Please sign in to comment.