From c0d6a23a3d45f6bb1d304e3033da069de6f2ad32 Mon Sep 17 00:00:00 2001 From: dhrname Date: Wed, 11 Jan 2012 20:00:54 +0900 Subject: [PATCH] =?utf8?q?beginElement=E3=83=A1=E3=82=BD=E3=83=83=E3=83=89?= =?utf8?q?=E3=82=92=E4=BF=AE=E6=AD=A3=E3=81=97=E3=81=A6=E3=80=81=E5=86=8D?= =?utf8?q?=E8=B5=B7=E5=8B=95=E6=99=82=E3=81=AE=E6=8C=AF=E3=82=8B=E8=88=9E?= =?utf8?q?=E3=81=84=E3=82=92=E5=87=A6=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- org/w3c/dom/svg.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/org/w3c/dom/svg.js b/org/w3c/dom/svg.js index fd7be8f..59102e0 100644 --- a/org/w3c/dom/svg.js +++ b/org/w3c/dom/svg.js @@ -5343,6 +5343,18 @@ SVGAnimationElement.prototype = new SVGElement(); var ttd = this.ownerDocument, evt = ttd.createEvent("TimeEvents"); this._starting = ttd.documentElement.getCurrentTime(); //getStartTimeメソッドで使う開始時刻 + if (this.getCurrentTime() > 0) { + /*アニメーションの最中で、beginEventが起きるときは、endEventが前もって起こされる。SVG1.1の仕様を参照 + * + * 19.4.2 Interface TimeEvent + * Note that if an element is restarted while it is currently playing, the element will raise an end event and another begin event, as the element restarts. + * + * http://www.w3.org/TR/SVG/animate.html#InterfaceTimeEvent + * + */ + this.endElement(); + this._currentFrame = 0; + } evt.initTimeEvent("beginEvent", ttd.defaultView, 0); this.dispatchEvent(evt); /*新しくリストの頭を更新して、別の値も実行させるようにする*/ @@ -5461,18 +5473,6 @@ NAIBU.Time = { if (nci._start) { var sti = nci._start[0]; if ((sti || (sti === 0)) && s1 <= sti && sti < s) { - if (nci.getCurrentTime() > 0) { - /*アニメーションの最中で、beginEventが起きるときは、endEventが前もって起こされる。SVG1.1の仕様を参照 - * - * 19.4.2 Interface TimeEvent - * Note that if an element is restarted while it is currently playing, the element will raise an end event and another begin event, as the element restarts. - * - * http://www.w3.org/TR/SVG/animate.html#InterfaceTimeEvent - * - */ - nci.endElement(); - nci._currentFrame = 0; - } nci.beginElement(); } sti = void 0; -- 2.11.0