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

Commit

Permalink
Fixed small issue with 'rect' type imagemap positioning
Browse files Browse the repository at this point in the history
  • Loading branch information
Craga89 committed Nov 27, 2011
1 parent 92bb74f commit 3946871
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion 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 Nov 21 21:18:24 2011 +0000
* Date: Thu Nov 24 17:54:34 2011 +0000
*/

/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
Expand Down
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 Nov 21 21:18:24 2011 +0000
* Date: Thu Nov 24 17:54:34 2011 +0000
*/

/* Core qTip styles */
Expand Down
7 changes: 5 additions & 2 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 Nov 21 21:18:24 2011 +0000
* Date: Thu Nov 24 17:54:34 2011 +0000
*/

/*jslint browser: true, onevar: true, undef: true, nomen: true, bitwise: true, regexp: true, newcap: true, immed: true, strict: true */
Expand Down Expand Up @@ -2258,7 +2258,10 @@ PLUGINS.imagemap = function(area, corner, flip)
result = {
width: Math.abs(coords[2] - coords[0]),
height: Math.abs(coords[3] - coords[1]),
offset: { left: coords[0], top: coords[1] }
offset: {
left: Math.min(coords[0], coords[2]),
top: Math.min(coords[1], coords[3])
}
};
break;

Expand Down
4 changes: 2 additions & 2 deletions dist/jquery.qtip.min.js

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion src/imagemap/imagemap.js
Expand Up @@ -88,7 +88,10 @@ PLUGINS.imagemap = function(area, corner, flip)
result = {
width: Math.abs(coords[2] - coords[0]),
height: Math.abs(coords[3] - coords[1]),
offset: { left: coords[0], top: coords[1] }
offset: {
left: Math.min(coords[0], coords[2]),
top: Math.min(coords[1], coords[3])
}
};
break;

Expand Down

0 comments on commit 3946871

Please sign in to comment.