Created
November 17, 2013 21:19
-
-
Save tkfm-yamaguchi/7518384 to your computer and use it in GitHub Desktop.
Original : rwdImageMaps jQuery plugin v1.5 Chrome/Safari (webkit) で画像のロードに遅延が発生した場合など、画像のオリジナルサイズが正しく取得できないことがあったのを修正
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- pre.rwdImageMaps.js 2013-11-18 05:54:45.588799920 +0900 | |
+++ post.rwdImageMaps.js 2013-11-18 05:53:19.692799931 +0900 | |
@@ -37,6 +37,14 @@ | |
h = temp.height; | |
} | |
+ // To get the natural width and height on Webkit, just use this.(width/height) | |
+ if (!w || !h) { | |
+ if (!w) | |
+ w = this.width; | |
+ if (!h) | |
+ h = this.height; | |
+ } | |
+ | |
var wPercent = $that.width()/100, | |
hPercent = $that.height()/100, | |
map = $that.attr('usemap').replace('#', ''), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment