svnno****@sourc*****
svnno****@sourc*****
2011年 4月 10日 (日) 22:11:50 JST
Revision: 2586 http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2586 Author: dhrname Date: 2011-04-10 22:11:50 +0900 (Sun, 10 Apr 2011) Log Message: ----------- stop-colorプロパティに対して、未対応だった色のキーワード値を対応させた Modified Paths: -------------- branches/07x/075/org/w3c/dom/svg.js Modified: branches/07x/075/org/w3c/dom/svg.js =================================================================== --- branches/07x/075/org/w3c/dom/svg.js 2011-04-10 12:55:04 UTC (rev 2585) +++ branches/07x/075/org/w3c/dom/svg.js 2011-04-10 13:11:50 UTC (rev 2586) @@ -4328,7 +4328,8 @@ href, stops, length, color = [], colors = [], - opacity = []; + opacity = [], + stop, sstyle, ci; if (!ele || !grad) { //まだ、path要素などが設定されていない場合 grad = ele = t = grad2 = href = stops = length = color = colors = opacity = null; return; @@ -4349,9 +4350,11 @@ } length = stops.length; for (var i = 0; i < length; ++i) { - var stop = stops[i], sstyle = stop.ownerDocument.defaultView.getComputedStyle(stop, ""); - color[i] = sstyle.getPropertyValue("stop-color"); - colors[i] = stop.offset.baseVal + " " + color[i]; + stop = stops[i]; + sstyle = stop.ownerDocument.defaultView.getComputedStyle(stop, ""); + ci = sstyle.getPropertyValue("stop-color"); + color[i] = SVGColor.prototype._keywords[ci] || ci; + colors[i] = stop.offset.baseVal + " " + ci; opacity[i] = (sstyle.getPropertyValue("stop-opacity") || 1) * t.getPropertyValue("fill-opacity") * t.getPropertyValue("opacity"); } ele.setAttribute("method", "none"); @@ -4363,7 +4366,7 @@ ele.setAttribute("o:opacity2", opacity[0]+ ""); /*SVGRadialGradientElementインターフェースで利用する*/ grad._color = color; - grad = ele = stops = lengh = color = colors = opacity = evt = t = null; + grad = grad2 = ele = stops = length = color = colors = opacity = evt = t = href = stop = sstyle = ci = null; }, false); return this; };