From: dhrname Date: Tue, 20 Oct 2015 13:51:25 +0000 (+0900) Subject: Lighten a setFrame method X-Git-Tag: version22~31 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=b3bb7ebaf476eff1aebde2ba0d3b54e57dd9e63d;p=sie%2Fsie.git Lighten a setFrame method --- diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index a8fa7fb..7e0dca9 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -1261,7 +1261,8 @@ base("$frame").up("$svgEvent").mix( { /*スケジュールに記録しておいたものを実行して、イベントを発火 * また、発火した場合は記録から取り除いて、次回から再び発火しないようにする*/ var obj = this.first, - cobj = obj; + cobj = obj, + floor = Math.floor; while(obj) { var frame = obj.frame, target = obj.target; @@ -1272,7 +1273,7 @@ base("$frame").up("$svgEvent").mix( { if ( (obj.eventType === "repeat") && (obj.count < obj.limit) ) { /*リピートイベントが、リピート制限内である場合*/ /*numの段階で、何回リピートしたかを求める*/ - evt.detail = obj.count += Math.floor( (num - frame) / obj.simpleDuration); + evt.detail = obj.count += floor( (num - frame) / obj.simpleDuration); cobj = obj; } else { /*ポインタの連結を変更することで、リストからobj を除去*/