OSDN Git Service

Lighten the init method of the animateElement object
authordhrname <dhrname@users.sourceforge.jp>
Sat, 6 May 2017 13:33:40 +0000 (22:33 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Sat, 6 May 2017 13:33:40 +0000 (22:33 +0900)
org/w3c/dom/smil.js
tool/funcproto/base.js

index a61399b..32368cc 100644 (file)
@@ -1806,11 +1806,11 @@ base("$calcMode").up("$attribute").mix( {
   var to, \r
       keyTime = 0,\r
       /*関数toRGBはrgbColor形式への変換処理で使う*/\r
-      toRGB = function(x) { return x; },\r
-      isColor = /^(?:fill|stroke|stop-color|color)$/.test(this.attrName);\r
-  if (isColor) {\r
+      toRGB = function(x) { return x; };\r
+  if (/^(?:fill|stroke|stop-color|color)$/.test(this.attrName)) {\r
     /*通常は、小数点以下の桁数を既定値の1桁とする\r
-     *RGB形式では補間に、小数を使わないため、0桁に設定\r
+     *ただし、fill属性など色を扱う属性であれば、\r
+     *RGB形式では、補間に小数を使わないため、0桁に設定\r
      * (なお、この作業は、setKeyメソッドの前に済ませておく必要がある)*/\r
     this.degits = 0;\r
     /*たとえば、fill属性などである場合には、rgbColor形式への変換処理をする*/\r
@@ -1848,7 +1848,7 @@ base("$calcMode").up("$attribute").mix( {
     this.setAdd(ele, to);\r
     this.setAccum(ele, to);\r
   }\r
-  keyTime = keywords = toRGB = isColor = void 0;\r
+  keyTime = keywords = toRGB = void 0;\r
 } )\r
 /*$animateTranformElementオブジェクト\r
  * animateTransform要素に関連するオブジェクト*/\r
index 9a3ecaf..daa65af 100644 (file)
@@ -195,7 +195,7 @@ var _base = {
          args = ai = argi = call = void 0;\r
          return this.__app.call.apply(this, arguments);\r
        },\r
-       callFunc: function() { return this }\r
+       callFunc: function() { return this; }\r
     },\r
 };\r
 \r