n = parseFloat(style.getPropertyValue("font-size")) * deter,\r
mt = -n-5+ "px",\r
lh = n+10+ "px",\r
- tod = tar.ownerDocument.documentElement,\r
- ttpc = ttp, //ttpcはttpのキャッシュ\r
tlen = tar.getComputedTextLength(),\r
anchor = style.getPropertyValue("text-anchor"),\r
isMiddle = (anchor === "middle"),\r
isEnd = (anchor === "end"),\r
tedeco = style.getPropertyValue("text-decoration"), //text-decorationは継承しないので、個々に設定する\r
ttps = ttp.style,\r
- ae = [],\r
lts = parseFloat(style.getPropertyValue("letter-spacing")),\r
wds = parseFloat(style.getPropertyValue("word-spacing"));\r
ttps.fontSize = n + "px"; //nは算出された文字の大きさ (CSSではなく、SVG独自のCTM方式による)\r
div, sty;\r
for (var i=0, dlen=divs.length;i<dlen;++i) {\r
var p = tar.getStartPositionOfChar(pos+i);\r
- if (!isMore) {\r
+ if (!isMore && isYokogaki) {\r
/*字詰めの処理はブラウザに任せておく*/\r
div = tar._doc.createElement("div");\r
div.appendChild(tar._doc.createTextNode(textNode.data));\r
}\r
sty.left = p.x + "px";\r
sty.top = p.y + "px";\r
- sty.width = sty.height = "0px";\r
+ sty.width = "3000px";\r
+ sty.height = "0px";\r
sty.marginTop = isYokogaki ? mt : "-5px";\r
sty.lineHeight = lh;\r
sty.textDecoration = tedeco;\r
sty.display = "none";\r
ttp.appendChild(div);\r
- if (!isMore) {\r
+ if (!isMore && isYokogaki) {\r
break;\r
}\r
}\r
cursor = style.getPropertyCSSValue("cursor"),\r
vis = style.getPropertyCSSValue("visibility"),\r
disp = style.getPropertyCSSValue("display"),\r
- tts = tar._tar.style,\r
- tft = tar.firstChild._tars, //空白のテキストノードの場合、tftがundefinedになる恐れがある\r
- ttt = "", //あらかじめ初期化しておく\r
- tfti;\r
+ tts = tar._tar.style;\r
if (color === "none"){\r
tts.color = "transparent";\r
} else if (color.indexOf("url") === -1) {\r
} else if (disp && !disp._isDefault) {\r
di = "block";\r
}\r
- var jt = tar._tar.firstChild,\r
- j = 0;\r
+ var jt = tar._tar.firstChild;\r
while (jt) {\r
jt.style.display = di;\r
jt = jt.nextSibling;\r
}\r
- while (ae[j]) { //a要素内部のテキストノードの処理\r
- tft = ae[j]._tars;\r
- ttt = tft[0] ? tft[0].innerText.charAt(0) : "";\r
- tftfunc(tft);\r
- for (var l=0, tli=tft.length;l<tli;++l) {\r
- tft[l].style.display = di;\r
- }\r
- l = void 0;\r
- ++j;\r
- }\r
- tar._cacheMatrix = anchor = isEnd = isMiddle = searchChild = tstylefunc = isMore = mt = lh = tftfunc = ae = isRect = evt = tar = style = tedeco = tpp = ttpc = style = color = cursor = disp = vis = ttps = backr = backrs = di = tft = jt = lts = deter = void 0;\r
+ tar._cacheMatrix = anchor = isEnd = isMiddle = searchChild = tstylefunc = isMore = mt = lh = isRect = evt = tar = style = tedeco = style = color = cursor = disp = vis = ttps = backr = backrs = di = jt = lts = deter = void 0;\r
};\r
\r
function SVGTextElement(_doc) {\r