From: dhrname Date: Sat, 28 May 2016 14:36:21 +0000 (+0900) Subject: Modify the _setEndFrame method X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=5583404793ca033220db3b2fbae24fa4ffce95f0;p=sie%2Fsie.git Modify the _setEndFrame method --- diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index e7f7db3..d05eb04 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -1154,8 +1154,7 @@ base("$calcMode").up("$attribute").mix( { line = frame = void 0; return false; } else if ( - ( ( frame < line.begin ) - || ( end <= frame ) + ( ( frame < line.begin ) || ( end <= frame ) ) && (this.state === "playing") ) { /*stateプロパティを書き換えることで、一度のみ、終了処理させる*/ this.state = "idling"; @@ -1631,11 +1630,12 @@ base("$calcMode").up("$attribute").mix( { _setEndFrame: function(currentFrame) { var list = this.element.__transformList; - if (!this.checkEnd || (this.fill !== "remove") || !list) { + if (!this.checkEnd(currentFrame) || (this.fill !== "remove") || !list) { return; } if (!this.isSum) { - /*凍結処理をしないで、かつ、効果が出ないようにする*/ + /*凍結処理をしないで、かつ、元の状態に戻して、効果が出ないようにする*/ + this.removeAttribute(); list[this.numberOfList] && (list[this.numberOfList].isPlaying = false); } else { diff --git a/tool/Spec/spec/SvgDomSpec.js b/tool/Spec/spec/SvgDomSpec.js index ab8c22c..4c34328 100644 --- a/tool/Spec/spec/SvgDomSpec.js +++ b/tool/Spec/spec/SvgDomSpec.js @@ -2933,7 +2933,7 @@ describe("SMIL Animation Spec", function() { expect(p.__transformList[1].isPlaying).toBeTruthy(); $animate._setEndFrame(1); expect(p.__transformList[0].isPlaying).toBeTruthy(); - expect(p.__transformList[1].isPlaying).toBeFalsy(); + expect(p.__transformList[1].isPlaying).toBeTruthy(); delete p.__transformList; ele.setAttributeNS(null, "type", "scale");