OSDN Git Service

Modify the updateList method for the zero-start problem
authordhrname <dhrname@users.sourceforge.jp>
Mon, 7 Nov 2016 13:06:58 +0000 (22:06 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Mon, 7 Nov 2016 13:06:58 +0000 (22:06 +0900)
org/w3c/dom/smil.js

index c7636e4..fc25d5e 100644 (file)
@@ -198,15 +198,15 @@ base("$frame").mix ( {
       var startTime = this.getMaxList(f, this.beginList),\r
           endTime = this.getMaxList(f, this.endList),\r
           cacheBegin = this.begin;\r
-      if ( (state === wait) || (state === post) ) {\r
+      if ( (!startTime) && (state === wait) ) {\r
+          /*開始時刻が0ならば、アニメーションを開始*/\r
+          this.begin = 0;\r
+          this.state = begin;\r
+      } else if ( (state === wait) || (state === post) ) {\r
         if (startTime > cacheBegin) {\r
           this.state = begin;\r
           /*beginプロパティに開始時刻をキャッシュ用に保存*/\r
           this.begin = startTime;\r
-        } else if (!startTime) {\r
-          /*開始時刻が0ならば、アニメーションを開始*/\r
-          this.begin = 0;\r
-          this.state = begin;\r
         }\r
       } else if (state === begin) {\r
         if (endTime >= cacheBegin) {\r