OSDN Git Service

Add the isPlaying property to the __transformList
authordhrname <dhrname@users.sourceforge.jp>
Tue, 26 Apr 2016 14:24:02 +0000 (23:24 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Tue, 26 Apr 2016 14:24:02 +0000 (23:24 +0900)
org/w3c/dom/smil.js
tool/Spec/spec/SvgDomSpec.js

index 41647cc..7ac2556 100644 (file)
@@ -1546,8 +1546,10 @@ base("$calcMode").up("$attribute").mix( {
      if (this.numberOfList < 0) {\r
        throw new Error("Number of The List Error");\r
      }\r
-     var list = this.element.__transformList;\r
-     list[this.numberOfList].value = this.type+ "(" +this.$animateElement.tocall.call(this, advance)+ ")";\r
+     var list = this.element.__transformList,\r
+         currentList = list[this.numberOfList];\r
+     currentList.value = this.type+ "(" +this.$animateElement.tocall.call(this, advance)+ ")";\r
+     currentList.isPlaying = true;\r
      var d = this.defaultValue;\r
      d = d && (d + " ");\r
      /*他のanimateTransform要素がadditive属性の値にreplaceをすでに設定していた場合、\r
index 4a770db..2b3b3b6 100644 (file)
@@ -2778,16 +2778,20 @@ describe("SMIL Animation Spec", function() {
           expect($animate.type).toBe("translate");\r
           expect(p.__transformList).toEqual([ {isPlaying: false,\r
                                                value: "translate(0)"} ]);\r
+          $animate.tocall(0);\r
+          expect(p.__transformList[0].isPlaying).toBeTruthy();\r
           \r
           ele.parentNode.appendChild(ele.cloneNode(true));\r
           $animate.numberOfList = -1;\r
           $animate.init(ele.parentNode.lastChild);\r
           expect($animate.numberOfList).toBe(1);\r
-          expect(p.__transformList).toEqual([ {isPlaying: false,\r
-                                               value: "translate(0)"}, \r
-                                              {isPlaying: false,\r
-                                               value: "translate(0)"} ]);\r
+          expect(p.__transformList[0].isPlaying).toBeTruthy();\r
+          expect(p.__transformList[1].isPlaying).toBeFalsy();\r
+\r
           expect($animate.type).toBe("translate");\r
+          $animate.tocall(0);\r
+          expect(p.__transformList[0].isPlaying).toBeTruthy();\r
+          expect(p.__transformList[1].isPlaying).toBeTruthy();\r
           \r
           delete p.__transformList;\r
           ele.setAttributeNS(null, "type", "scale");\r