OSDN Git Service

Lighten the calcMode object
authordhrname <dhrname@users.sourceforge.jp>
Thu, 19 Mar 2015 14:12:45 +0000 (23:12 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Thu, 19 Mar 2015 14:12:45 +0000 (23:12 +0900)
org/w3c/dom/smil.js

index 9c52a95..2397f97 100644 (file)
@@ -566,13 +566,15 @@ base("$from").of( {
    call: function() {\r
      var f = function (t) {\r
        /*tは進捗率*/\r
-       if (!this.keyTime || !isFinite(this.keyTime) ) {\r
+       var tkey = this.keyTime;\r
+       if (!tkey || !isFinite(tkey) ) {\r
          return this.string;\r
-       } else if (this.keyTime === 0) {\r
+       } else if (tkey === 0) {\r
          t = 0; \r
        } else {\r
-         t = t / this.keyTime;\r
+         t = t / tkey;\r
        }\r
+       tkey = void 0;\r
        return isNaN(t) ? this.string\r
                        : this.to.advance(t);\r
      }.bind(this);\r