[Sie-announce] SIEコード [2708] SVGAnimateElementの修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 5月 26日 (木) 23:08:15 JST


Revision: 2708
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2708
Author:   dhrname
Date:     2011-05-26 23:08:15 +0900 (Thu, 26 May 2011)

Log Message:
-----------
SVGAnimateElementの修正

Modified Paths:
--------------
    branches/07x/078/org/w3c/dom/svg.js

Modified: branches/07x/078/org/w3c/dom/svg.js
===================================================================
--- branches/07x/078/org/w3c/dom/svg.js	2011-05-26 13:28:32 UTC (rev 2707)
+++ branches/07x/078/org/w3c/dom/svg.js	2011-05-26 14:08:15 UTC (rev 2708)
@@ -5188,9 +5188,9 @@
        *この_valueListプロパティはアニメの際に使うので、_valuesプロパティはアニメ中に使わないことに注意
        */
       var vi = ttr.cloneNode(false);
-      if (!tar._values[0]) {
+      if (!tar._values[0]) {   //to属性か、by属性が設定されている場合
         tar._values[0] = ttr.getAttributeNS(null, attrName) || ttr.style.getPropertyValue(attrName);
-        if (!tar._values[1]) { //by属性のみが設定されている場合
+        if (!tar._values[1] && tar._values[2]) { //by属性のみが設定されている場合
           var v2 = parseFloat(tar._values[0]) + parseFloat(tar._values[2]), tanni = tar._values[0].match(/\D+/) || [""];
           tar._values[1] = v2 + tanni[0];
           tar._values.pop();
@@ -5207,7 +5207,12 @@
         }
       } else if (!!CSS2Properties[attrName] || attrName.indexOf("-") > -1) { //スタイルシートのプロパティならば
         for (var i=0, tav=tar._values, tvli=tav.length;i<tvli;++i) {
-          tar._valueList[i] = parseFloat(tav[i]);
+          if ((attrName === "fill") || (attrName === "stroke") || (attrName === "stop-color")) {
+            tar._valueList[i] = new SVGPaint();
+            tar._valueList[i].setPaint(1, null, tav[i], null)
+          } else {
+            tar._valueList[i] = parseFloat(tav[i]);
+          }
         }
       } else if ("animatedPoints" in ttr) {
         ttr.animatedPoints = vi.points;




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