OSDN Git Service

Modify the _setEndFrame method
authordhrname <dhrname@users.sourceforge.jp>
Sat, 28 May 2016 14:36:21 +0000 (23:36 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Sat, 28 May 2016 14:36:21 +0000 (23:36 +0900)
org/w3c/dom/smil.js
tool/Spec/spec/SvgDomSpec.js

index e7f7db3..d05eb04 100644 (file)
@@ -1154,8 +1154,7 @@ base("$calcMode").up("$attribute").mix( {
       line = frame = void 0;\r
       return false;\r
     } else if (\r
-          ( ( frame < line.begin )\r
-            || ( end <= frame )\r
+          ( ( frame < line.begin ) || ( end <= frame )\r
           ) && (this.state === "playing") ) {\r
       /*stateプロパティを書き換えることで、一度のみ、終了処理させる*/\r
       this.state = "idling";\r
@@ -1631,11 +1630,12 @@ base("$calcMode").up("$attribute").mix( {
    \r
    _setEndFrame: function(currentFrame) {\r
      var list = this.element.__transformList;\r
-     if (!this.checkEnd || (this.fill !== "remove") || !list) {\r
+     if (!this.checkEnd(currentFrame) || (this.fill !== "remove") || !list) {\r
        return;\r
      }\r
      if (!this.isSum) {\r
-       /*凍結処理をしないで、かつ、効果が出ないようにする*/\r
+       /*凍結処理をしないで、かつ、元の状態に戻して、効果が出ないようにする*/\r
+       this.removeAttribute();\r
        list[this.numberOfList]\r
         && (list[this.numberOfList].isPlaying = false);\r
      } else {\r
index ab8c22c..4c34328 100644 (file)
@@ -2933,7 +2933,7 @@ describe("SMIL Animation Spec", function() {
           expect(p.__transformList[1].isPlaying).toBeTruthy();\r
           $animate._setEndFrame(1);\r
           expect(p.__transformList[0].isPlaying).toBeTruthy();\r
-          expect(p.__transformList[1].isPlaying).toBeFalsy();\r
+          expect(p.__transformList[1].isPlaying).toBeTruthy();\r
           \r
           delete p.__transformList;\r
           ele.setAttributeNS(null, "type", "scale");\r