OSDN Git Service

Override the _getAttr method
authordhrname <dhrname@users.sourceforge.jp>
Wed, 28 Oct 2015 13:39:09 +0000 (22:39 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Wed, 28 Oct 2015 13:39:09 +0000 (22:39 +0900)
org/w3c/dom/smil.js

index febd178..104b9f5 100644 (file)
@@ -1141,6 +1141,16 @@ base("$calcMode").up("$attribute").mix( {
       this.element.setAttributeNS(this.attrNameSpace, this.attrName, this._tocall(advance));\r
       line = duration = advance = void 0;\r
     }\r
+  },\r
+  \r
+  /*_getAttrメソッドをオーバライド*/\r
+  _getAttr: function (name, def) {\r
+    var s= this.$attribute._getAttr.apply(this, arguments);\r
+    if ((name === "from") && !s && this.defaultValue) {\r
+      /*from属性がない場合、対象要素の既定値を返す*/\r
+      return this.defaultValue;\r
+    }\r
+    return s;\r
   }\r
 \r
 /*initメソッドに追加処理\r