[Sie-announce] SIEコード [2103] _getOffsetメソッドの修正

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 10月 31日 (日) 21:32:14 JST


Revision: 2103
          http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2103
Author:   dhrname
Date:     2010-10-31 21:32:14 +0900 (Sun, 31 Oct 2010)

Log Message:
-----------
_getOffsetメソッドの修正

Modified Paths:
--------------
    branches/06x/062/org/w3c/dom/svg.js

Modified: branches/06x/062/org/w3c/dom/svg.js
===================================================================
--- branches/06x/062/org/w3c/dom/svg.js	2010-10-29 14:11:43 UTC (rev 2102)
+++ branches/06x/062/org/w3c/dom/svg.js	2010-10-31 12:32:14 UTC (rev 2103)
@@ -4596,7 +4596,7 @@
   this._end = offset + ntc;
 };
 SVGAnimationElement.prototype._eventRegExp = /(mouse|activ|clic)[a-z]+/;
-SVGAnimationElement.prototype._timeRegExp = /[\-\d\.]+(h|min|s|ms)/;
+SVGAnimationElement.prototype._timeRegExp = /[\-\d\.]+(h|min|s|ms)?/;
 SVGAnimationElement.prototype._unit = {
     "h" : 2880000,
     "min" : 48000,
@@ -4612,8 +4612,10 @@
  */
 SVGAnimationElement.prototype._getOffset = function(/*string*/ t) {
   var n = parseFloat(t.match(this._timeRegExp));
-  if (!isNaN(n)) {
+  if (!isNaN(n) && RegExp.$1) {
     var offset = n * this._unit[RegExp.$1]
+  } else if (!isNaN(n)) {
+    var offset = n;
   } else {
     var offset = 0;
   }




Sie-announce メーリングリストの案内
Back to archive index