svnno****@sourc*****
svnno****@sourc*****
2011年 11月 7日 (月) 22:37:54 JST
Revision: 3077
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=3077
Author: dhrname
Date: 2011-11-07 22:37:54 +0900 (Mon, 07 Nov 2011)
Log Message:
-----------
SVGTextElementについて、a要素に対応できるよう修正
Modified Paths:
--------------
branches/08x/089/org/w3c/dom/svg.js
Modified: branches/08x/089/org/w3c/dom/svg.js
===================================================================
--- branches/08x/089/org/w3c/dom/svg.js 2011-11-07 13:14:15 UTC (rev 3076)
+++ branches/08x/089/org/w3c/dom/svg.js 2011-11-07 13:37:54 UTC (rev 3077)
@@ -4186,7 +4186,8 @@
tlen = tar.getComputedTextLength(),
anchor = style.getPropertyValue("text-anchor"),
tedeco = style.getPropertyValue("text-decoration"), //text-decorationは継承しないので、個々に設定する
- ttps = ttp.style;
+ ttps = ttp.style,
+ ae = [];
ttps.fontSize = n + "px";
ttps.fontFamily = style.getPropertyValue("font-family");
ttps.fontStyle = style.getPropertyValue("font-style");
@@ -4240,6 +4241,7 @@
} else if ((ti.localName === "a") && (ti.namespaceURI === "http://www.w3.org/2000/svg") && ti.firstChild) {
ttp = ti._tar;
ti = ti.firstChild;
+ ae[ae.length] = ti;
i-=2;
}
}
@@ -4303,11 +4305,17 @@
} else if (disp && !disp._isDefault) {
di = "block";
}
- for (var i=0, tli=tft.length;i<tli;++i) {
+ for (var i=0, j=0, tli=tft.length;i<tli;++i) {
tft[i].style.display = di;
+ while (ae[j]) { //a要素を処理
+ for (var l=0, tli=ae[j]._tars.length;l<tli;++l) {
+ ae[j]._tars[l].style.display = di;
+ }
+ ++j;
+ }
}
delete tar._cacheMatrix;
- isRect = evt = tar = style = tedeco = tpp = ttpc = style = color = cursor = disp = vis = ttps = backr = backrs = di = tft = void 0;
+ ae = isRect = evt = tar = style = tedeco = tpp = ttpc = style = color = cursor = disp = vis = ttps = backr = backrs = di = tft = void 0;
}, false);
evt = tar = void 0;
},false);