OSDN Git Service

Lighten the init method
authordhrname <dhrname@users.sourceforge.jp>
Wed, 8 Feb 2017 12:30:27 +0000 (21:30 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Wed, 8 Feb 2017 12:30:27 +0000 (21:30 +0900)
org/w3c/dom/smil.js

index 76340f1..2d00e89 100644 (file)
@@ -1821,7 +1821,9 @@ base("$calcMode").up("$attribute").mix( {
     to = this.setKey(ele);\r
   }\r
   if (to) {\r
-    this.funcs = to.map( function(x) {\r
+    var aa = new Array(to.length);\r
+    for (var i=0;i<to.length;++i) {\r
+      var x = to[i];\r
       x.to.string = toRGB(x.to.string);\r
       x.to.from.string = toRGB(x.to.from.string);\r
       var s = x.call();\r
@@ -1830,9 +1832,9 @@ base("$calcMode").up("$attribute").mix( {
        * endKeyTimeプロパティは区間のエンド地点*/\r
       s.startKeyTime = keyTime;\r
       keyTime = s.endKeyTime = keyTime + x.keyTime;\r
-      return s;\r
-    } )\r
-     .filter( function(s) {\r
+      aa[i] = s;\r
+    }\r
+    this.funcs = aa.filter( function(s) {\r
        if (!this.timeline.isResolved) {\r
          /*begin属性などにイベントを設定していた(未解決の)場合、後のs(0.1)がうまく作動せず、\r
           * 例外を出してしまうため、ここで返しておく*/\r
@@ -1845,7 +1847,7 @@ base("$calcMode").up("$attribute").mix( {
     this.setAdd(ele, to);\r
     this.setAccum(ele, to);\r
   }\r
-  keywords = toRGB = isColor = void 0;\r
+  keyTime = keywords = toRGB = isColor = void 0;\r
 } )\r
 /*$animateTranformElementオブジェクト\r
  * animateTransform要素に関連するオブジェクト*/\r