From: dhrname Date: Fri, 6 Mar 2015 14:23:47 +0000 (+0900) Subject: Modify the object X-Git-Tag: version22~278 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=87a8ed08a07ffd1fd98afc4306091ca4327d2d45;p=sie%2Fsie.git Modify the object --- diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index 55429ed..88339ac 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -557,7 +557,7 @@ base("$from").of( { /*keySpline属性の値を設定*/ keySpline: null, - from: base("$from"), + to: base("$from").$to, /*与えられたアニメーションの進捗率を使った時間の圧縮率を計算するための関数を返す*/ call: function() { @@ -566,7 +566,8 @@ base("$from").of( { if (!this.keyTime) { t = 0; } - return t / this.keyTime; + t = t / this.keyTime; + return t; }.bind(this); } } ); diff --git a/tool/Spec/spec/SvgDomSpec.js b/tool/Spec/spec/SvgDomSpec.js index d344c6f..ee805ce 100644 --- a/tool/Spec/spec/SvgDomSpec.js +++ b/tool/Spec/spec/SvgDomSpec.js @@ -3099,11 +3099,11 @@ describe("SMIL Animation Spec", function() { } ); describe("A $calcMode object", function() { var calc = base("$calcMode"), - from = calc.from; + to = calc.to; beforeEach( function() { calc = calc.up(); - calc.from = from = from.up(); - from.up("$to"); + calc.to = to = to.up(); + to.from = to.from.up(); } ); /*境界条件を調べておく (limit value analysis)*/ it("should be this for the value (limit value analysis)", function() { @@ -3118,19 +3118,17 @@ describe("SMIL Animation Spec", function() { /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/ it("should be this for the value (the valid partion)", function() { calc.keyTime = 0.5; - expect(calc.call()(0.2)).toEqual(0.4); - expect(calc.call()(0.3)).toEqual(0.6); + expect(calc.call()(0.2)).toBe("0.4"); + expect(calc.call()(0.3)).toBe("0.6"); /*もう一度確かめる*/ - expect(calc.call()(0.2)).toEqual(0.4); + expect(calc.call()(0.2)).toBe("0.4"); calc = base("$calcMode").up(); calc.keyTime = 0.2; - from.string = "0s"; - from.$to.string = "1s"; - from.$to.degit = 1; - from.$to.call(); - from.call(); - expect(from.$to.advance(0.1)).toBe("0.5s"); + to.from.string = "0s"; + to.string = "1s"; + to.degit = 1; + expect(calc.call()(0.1)).toBe("0.5s"); } ); /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/ it("should be this for the value (the invalid partion)", function() {