OSDN Git Service

Lighten the object
authordhrname <dhrname@users.sourceforge.jp>
Sat, 16 May 2015 14:05:42 +0000 (23:05 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Sat, 16 May 2015 14:05:42 +0000 (23:05 +0900)
org/w3c/dom/smil.js

index 99f3e38..0f8a67e 100644 (file)
@@ -833,7 +833,12 @@ base("$calcMode").up("$attribute").mix( {
   \r
   /*指定された属性の規定値*/\r
   defaultValue: "",\r
-\r
+  \r
+  /*initメソッドで使われるアニメーション関数*/\r
+  setFrame: function () {\r
+    this.element.setAttributeNS(null, this.attrName, this.to);\r
+  },\r
+  \r
   init: function(ele) {\r
     var line = this.push(ele);\r
     if (ele && ele.getAttributeNS) {\r
@@ -844,9 +849,7 @@ base("$calcMode").up("$attribute").mix( {
     if (line && thisele) {\r
       this.defaultValue = thisele.getAttributeNS(null, this.attrName)\r
          || thisele.ownerDocument.defaultView.getComputedStyle(thisele, "").getPropertyValue(this.attrName);\r
-      line.setFrame = function () {\r
-        this.element.setAttributeNS(null, this.attrName, this.to);\r
-      }.bind(this);\r
+      line.setFrame = this.setFrame.bind(this);\r
     }\r
     line = thisele = void 0;\r
   }\r