svnno****@sourc*****
svnno****@sourc*****
2010年 10月 19日 (火) 20:46:30 JST
Revision: 2065
http://sourceforge.jp/projects/sie/svn/view?view=rev&revision=2065
Author: dhrname
Date: 2010-10-19 20:46:30 +0900 (Tue, 19 Oct 2010)
Log Message:
-----------
SMILAnimationElementの修正
Modified Paths:
--------------
branches/06x/061/org/w3c/dom/svg.js
Modified: branches/06x/061/org/w3c/dom/svg.js
===================================================================
--- branches/06x/061/org/w3c/dom/svg.js 2010-10-18 14:15:10 UTC (rev 2064)
+++ branches/06x/061/org/w3c/dom/svg.js 2010-10-19 11:46:30 UTC (rev 2065)
@@ -4397,7 +4397,8 @@
this.style.setProperty = function(){};
this._tar = null;
/*readonly SVGElement*/ this.targetElement;
- this._beginValue = this._endValue = null;
+ this._beginValue = "0ms";
+ this._endValue = null;
this._currentFrame = 0;
this._currentCount = 0;
/*_maxCountはrepeatCount属性で指定された数値
@@ -4414,7 +4415,7 @@
*_beginはアニメ開始時の秒数。_endはアニメ終了時の秒数。
*なお、文書読み込み終了時(アニメ開始時刻)の秒数を0とする。
*/
- this._begin = 0;
+ this._begin = null;
this._end = null;
this._from = this._to = this._values = this._by = null;
this._keyTimes = null;
@@ -4497,21 +4498,19 @@
} else {
tar.targetElement = tar.parentNode;
}
- if (tar._beginValue) {
- tar._eventSync(tar._beginValue,
- (function(te, offse, ta, t) {
- ta.addEventListener( t.match(te._eventRegExp)[0],
- function(){
- if (offse !== 0) {
- te.beginElementAt(offse);
- } else {
- te._begin = NAIBU.Time.currentFrame;
- te.beginElement();
- te._currentFrame++;
- }
- }, false);
- }), "beginElementAt");
- }
+ tar._eventSync(tar._beginValue,
+ (function(te, offse, ta, t) {
+ ta.addEventListener( t.match(te._eventRegExp)[0],
+ function(){
+ if (offse !== 0) {
+ te.beginElementAt(offse);
+ } else {
+ te._begin = NAIBU.Time.currentFrame;
+ te.beginElement();
+ te._currentFrame++;
+ }
+ }, false);
+ }), "beginElementAt");
if (tar._endValue) {
tar._eventSync(tar._endValue,
(function(te, offse, ta, t) {
@@ -4638,22 +4637,25 @@
for (var i=0,ncli=nc.length;i<ncli;++i) {
var nci = nc[i];
nci.ownerDocument.documentElement.setCurrentTime(s);
- if (nci.getStartTime() <= s) {
- if (nci.getCurrentTime() === 0) {
- nci.beginElement();
+ if ("_begin" in nci) {
+ if (nci.getStartTime() <= s) {
+ if (nci.getCurrentTime() === 0) {
+ nci.beginElement();
+ }
+ nci._currentFrame++;
}
- nci._currentFrame++;
- }
- if (nci._end) {
- if (nci._end <= s && nci.getCurrentTime() !== 0) {
- nci.endElement();
- nci._currentFrame = 0;
- nci._end = null;
+ if (nci._end) {
+ if (nci._end <= s && nci.getCurrentTime() !== 0) {
+ nci.endElement();
+ nci._currentFrame = 0;
+ delete nci._begin;
+ nci._end = null;
+ }
}
+ if (!!nci._frame) {
+ nci._frame();
+ }
}
- if (!!nci._frame) {
- nci._frame();
- }
nci = null;
}
/* } catch (e) {