[Sie-announce] SIEコード [2933] SVGTextElementにコメントを追加

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 9月 10日 (土) 23:57:18 JST


Revision: 2933
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2933
Author:   dhrname
Date:     2011-09-10 23:57:18 +0900 (Sat, 10 Sep 2011)

Log Message:
-----------
SVGTextElementにコメントを追加

Modified Paths:
--------------
    branches/08x/085/org/w3c/dom/svg.js

Modified: branches/08x/085/org/w3c/dom/svg.js
===================================================================
--- branches/08x/085/org/w3c/dom/svg.js	2011-09-10 14:49:51 UTC (rev 2932)
+++ branches/08x/085/org/w3c/dom/svg.js	2011-09-10 14:57:18 UTC (rev 2933)
@@ -4171,8 +4171,10 @@
     if (evt.eventPhase === /*Event.BUBBLING_PHASE*/ 3) {
       return; //強制終了させる
     }
-    var tar = evt.target;
-    var tnext = tar.nextSibling, tpar = tar.parentNode, isLast = true;
+    var tar = evt.target,
+        tnext = tar.nextSibling,
+        tpar = tar.parentNode,
+        isLast = true;
     if (tnext && tnext._tar && tpar._tar && (tnext._tar.parentNode === tpar._tar)) {
       tpar._tar.insertBefore(tar._tar, tnext._tar);
     } else if (tnext && !tnext._tar && tpar._tar) {
@@ -4285,6 +4287,9 @@
       }
       if ((tar.x.baseVal.numberOfItems === 1) && (tar.y.baseVal.numberOfItems === 1)
           && tar._isYokogaki && (tar.firstChild.nodeName === "#text")) {
+        /*xとy属性が一つの値しか取らないとき、字詰めの処理をすべてブラウザに任せておく。
+         *以下では、他のdiv要素のテキストをすべて、最初のdiv要素にまとめている
+         */
         var tft = tar.firstChild._tars;
         for (var i=1, tli=tft.length;i<tli;++i) {
           tft[0].innerText += tft[i].innerText;
@@ -4300,8 +4305,8 @@
         isRect = false;
       }
       if (!isRect) {
-        var backr = _doc.createElement("v:rect");
-        var backrs = backr.style; //ずれを修正するためのもの
+        var backr = _doc.createElement("v:rect"),
+            backrs = backr.style; //ずれを修正するためのもの
         backrs.width = backrs.height = "1px";
         backrs.left = backrs.top = "0px";
         backr.stroked = backr.filled = "false";
@@ -4309,7 +4314,7 @@
       }
       delete tar._cacheMatrix;
       delete tar._currentStyle;
-      isRect = evt = tar = style = tpp = ttpc = style = color = cursor = disp = vis = ttps = null;
+      isRect = evt = tar = style = tpp = ttpc = style = color = cursor = disp = vis = ttps = backr = backrs = null;
     }, false);
     evt = tar = null;
   },false);




Sie-announce メーリングリストの案内
Back to archive index