[Sie-announce] SIEコード [2043] tspan要素の縦の位置がずれるバグを修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 10月 8日 (金) 22:21:36 JST


Revision: 2043
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2043
Author:   dhrname
Date:     2010-10-08 22:21:36 +0900 (Fri, 08 Oct 2010)

Log Message:
-----------
tspan要素の縦の位置がずれるバグを修正

Modified Paths:
--------------
    branches/06x/061/org/w3c/dom/svg.js

Modified: branches/06x/061/org/w3c/dom/svg.js
===================================================================
--- branches/06x/061/org/w3c/dom/svg.js	2010-10-07 14:05:59 UTC (rev 2042)
+++ branches/06x/061/org/w3c/dom/svg.js	2010-10-08 13:21:36 UTC (rev 2043)
@@ -3339,16 +3339,15 @@
       var fontSize = parseFloat(style.getPropertyValue("font-size"));
       var tx = tar.x.baseVal, ty = tar.y.baseVal, tdx = tar.dx.baseVal, tdy = tar.dy.baseVal;
       /*親要素の属性も参照しておく*/
-      var isText = tp.localName === "text";
-      if (tp && (isText ||(tp.localName === "tspan"))) {
+      if (tp && ((tp.localName === "text") ||(tp.localName === "tspan"))) {
         var ptx = tp.x.baseVal, pty = tp.y.baseVal, ptdx = tp.dx.baseVal, ptdy = tp.dy.baseVal;
       } else {
         var ptx = pty = ptdx = ptdy = {numberOfItems : 0};
       }
       var kern = "f ijltIr.,:;'-\"()", akern = "1234567890abcdeghknopquvxyz";
-      if (isYokogaki && isText) {
+      if (isYokogaki && (tar.localName === "text")) {
         y += fontSize * 0.2;
-      } else if (isText){
+      } else if (tar.localName === "text"){
         x -= fontSize * 0.5;
       }
       while (ti) {




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