svnno****@sourc*****
svnno****@sourc*****
2011年 9月 17日 (土) 21:45:45 JST
Revision: 2955
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2955
Author: dhrname
Date: 2011-09-17 21:45:44 +0900 (Sat, 17 Sep 2011)
Log Message:
-----------
SVGTextElementの字詰めに関する改良
Modified Paths:
--------------
branches/08x/086/org/w3c/dom/svg.js
Modified: branches/08x/086/org/w3c/dom/svg.js
===================================================================
--- branches/08x/086/org/w3c/dom/svg.js 2011-09-15 11:24:06 UTC (rev 2954)
+++ branches/08x/086/org/w3c/dom/svg.js 2011-09-17 12:45:44 UTC (rev 2955)
@@ -4256,6 +4256,7 @@
sty.marginTop = tar._isYokogaki ? -n-5+ "px" : "-5px";
sty.lineHeight = n+10+ "px";
sty.textDecoration = tedeco;
+ sty.display = "block";
ttp.appendChild(ti._tars[ij]);
sty = p = null;
}
@@ -4310,11 +4311,14 @@
/*xとy属性が一つの値しか取らないとき、字詰めの処理をすべてブラウザに任せておく。
*以下では、他のdiv要素のテキストをすべて、最初のdiv要素にまとめている
*/
- var tft = tar.firstChild._tars;
+ var tft = tar.firstChild._tars,
+ ttt = tft[0].innerText.charAt(0); //あらかじめ初期化しておく
for (var i=1, tli=tft.length;i<tli;++i) {
- tft[0].innerText += tft[i].innerText;
+ ttt += tft[i].innerText;
tft[i].style.display = "none";
}
+ tft[0].innerText = ttt;
+ ttt = tft = null;
}
var isRect = true;
if (ttp.lastChild) {