OSDN Git Service

Change the _setFrame method
authordhrname <dhrname@users.sourceforge.jp>
Fri, 22 May 2015 14:41:02 +0000 (23:41 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Fri, 22 May 2015 14:41:02 +0000 (23:41 +0900)
org/w3c/dom/smil.js

index 22b89bc..0958c36 100644 (file)
@@ -881,6 +881,7 @@ base("$calcMode").up("$attribute").mix( {
          activeTime: 1\r
        }\r
       );\r
+      /*activeTimeプロパティとbeginプロパティは_setEndFrame関数内で使うため、コピーしておく*/\r
       this.activeTime = line.activeTime;\r
       this.begin = line.begin;\r
       base("$frame").addLine(\r
@@ -900,13 +901,15 @@ base("$calcMode").up("$attribute").mix( {
      * 再生リピート回数 = advance - simpleAd = Math.floor(advance)*/\r
     var advance = (frame - this.begin) / this.activeTime,\r
         simpleAd = advance - Math.floor(advance);\r
-    this.element.setAttributeNS(null, this.to.advance(simpleAd));\r
+    this.element.setAttributeNS(null, this.to(simpleAd));\r
   }\r
 \r
 /*initメソッドに追加処理\r
  * onメソッドについては、base.jsを参照のこと*/\r
 } ).on ("init", function(ele) {\r
-  this.to = this.setKey(ele);\r
+  var to;\r
+  ele && (to = this.setKey(ele));\r
+  to && (this.to = to[0].call());\r
 });\r
 \r
 function getDocument() \r