From: dhrname Date: Fri, 6 Mar 2015 14:51:29 +0000 (+0900) Subject: Modify the object X-Git-Tag: version22~277 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=acec2c80ea1e4337814d45c99973b4e167961615;p=sie%2Fsie.git Modify the object --- diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index 88339ac..9326765 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -556,19 +556,19 @@ base("$from").of( { /*keySpline属性の値を設定*/ keySpline: null, - - to: base("$from").$to, - + /*与えられたアニメーションの進捗率を使った時間の圧縮率を計算するための関数を返す*/ call: function() { + this.to.call(); return function(t) { /*tは進捗率*/ if (!this.keyTime) { t = 0; } t = t / this.keyTime; - return t; + console.log(this.to.from); + return this.to.advance(t); }.bind(this); } -} ); +} ).to = base("$from").$to; //#endif // _SMIL_IDL_ diff --git a/tool/Spec/spec/SvgDomSpec.js b/tool/Spec/spec/SvgDomSpec.js index ee805ce..a48b149 100644 --- a/tool/Spec/spec/SvgDomSpec.js +++ b/tool/Spec/spec/SvgDomSpec.js @@ -2993,7 +2993,6 @@ describe("SMIL Animation Spec", function() { expect(from.strList).toBeNull(); expect(from.advance(0)).toBe(""); expect(from.$to.from).toBe(from.numList); - console.log(from.$to.from); expect(from.$to.advance(0)).toBe("0"); expect(from.call()).toBe(from.numList); } ); @@ -3102,8 +3101,8 @@ describe("SMIL Animation Spec", function() { to = calc.to; beforeEach( function() { calc = calc.up(); - calc.to = to = to.up(); - to.from = to.from.up(); + calc.to = base("$from").up().mix( {string: "1"} ); + calc.to.from = base("$from").up().mix( {string: "0"} ); } ); /*境界条件を調べておく (limit value analysis)*/ it("should be this for the value (limit value analysis)", function() { @@ -3125,9 +3124,11 @@ describe("SMIL Animation Spec", function() { calc = base("$calcMode").up(); calc.keyTime = 0.2; - to.from.string = "0s"; - to.string = "1s"; - to.degit = 1; + calc.to = base("$from").up(); + calc.to.from = base("$from").up(); + calc.to.from.string = "0s"; + calc.to.string = "1s"; + calc.to.degit = 1; expect(calc.call()(0.1)).toBe("0.5s"); } ); /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/