OSDN Git Service

getStartTimeメソッドの修正
authordhrname <dhrname@users.sourceforge.jp>
Wed, 4 Jan 2012 12:37:02 +0000 (21:37 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Wed, 4 Jan 2012 12:37:02 +0000 (21:37 +0900)
org/w3c/dom/svg.js

index e45ecc4..ed47b7b 100644 (file)
@@ -5257,14 +5257,14 @@ SVGAnimationElement.prototype._getOffset = function(/*string*/ t) {
     return (this._begin);
   } else {
     var _begin =  this._beginValue ? this._getOffset(this._beginValue) : 0,
-         that = this,
+        that = this,
         timing = function(val, name, offset) {
       /*timing関数は時間のタイミングをidとeventと、clock-value(offset)に分割して処理していく
        *まず、idを検出するためのsearcIdローカル関数を作る
        */
       var searchId = function () {
             var n = val.indexOf(".");
-            if ((n > 0) && val.charAt(n+1).test(/[a-z]/i)) { //. (dot)の後がアルファベットならば
+            if ((n > 0) && (/[a-z]/i).test(val.charAt(n+1))) { //. (dot)の後がアルファベットならば
               return (val.slice(0, n));
             }
             n = nn = void 0;
@@ -5291,7 +5291,7 @@ SVGAnimationElement.prototype._getOffset = function(/*string*/ t) {
             } else {
               that.addEventListener("repeatEvent", ds);
             }
-      } else if (val.test(/\.(begin|end)/)) { //3) syncbase-valueの場合
+      } else if ((/\.(begin|end)/).test(val)) { //3) syncbase-valueの場合
         id = searchId();
         if (id) {
           var ds = function (evt) {
@@ -5322,7 +5322,7 @@ SVGAnimationElement.prototype._getOffset = function(/*string*/ t) {
         }
       }
     };
-    timing(this._beginValue, "beginElementAt", _begin);
+    timing((this._beginValue || "0ms"), "beginElementAt", _begin);
     if (this._endValue) {
       timing(this._endValue, "endElementAt", this._getOffset(this._endValue));
     }