svnno****@sourc*****
svnno****@sourc*****
2010年 7月 16日 (金) 21:51:55 JST
Revision: 1953 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=1953 Author: dhrname Date: 2010-07-16 21:51:55 +0900 (Fri, 16 Jul 2010) Log Message: ----------- Modified Paths: -------------- branches/06x/061/org/w3c/dom/svg.js Modified: branches/06x/061/org/w3c/dom/svg.js =================================================================== --- branches/06x/061/org/w3c/dom/svg.js 2010-07-16 12:29:09 UTC (rev 1952) +++ branches/06x/061/org/w3c/dom/svg.js 2010-07-16 12:51:55 UTC (rev 1953) @@ -575,6 +575,11 @@ var s = rgbColor.match(/\d+/g); } else if (rgbColor.indexOf("#") === 0) { //#を含む場合 var s = [], _parseInt = parseInt; + if (rgbColor.length < 5) { + var c = "#" + rgbColor.charAt(1) + rgbColor.charAt(1) + rgbColor.charAt(2) + rgbColor.charAt(2) + rgbColor.charAt(3) + rgbColor.charAt(3); + rgbColor = c; + c = null; + } s[0] = _parseInt(rgbColor.charAt(1)+rgbColor.charAt(2), 16)+ ""; s[1] = _parseInt(rgbColor.charAt(3)+rgbColor.charAt(4), 16)+ ""; s[2] = _parseInt(rgbColor.charAt(5)+rgbColor.charAt(6), 16)+ "";