OSDN Git Service

Modify the object
authordhrname <dhrname@users.sourceforge.jp>
Fri, 6 Mar 2015 14:51:29 +0000 (23:51 +0900)
committerdhrname <dhrname@users.sourceforge.jp>
Fri, 6 Mar 2015 14:51:29 +0000 (23:51 +0900)
org/w3c/dom/smil.js
tool/Spec/spec/SvgDomSpec.js

index 88339ac..9326765 100644 (file)
@@ -556,19 +556,19 @@ base("$from").of( {
    \r
    /*keySpline属性の値を設定*/\r
    keySpline: null,\r
-   \r
-   to: base("$from").$to,\r
-   \r
+      \r
    /*与えられたアニメーションの進捗率を使った時間の圧縮率を計算するための関数を返す*/\r
    call: function() {\r
+     this.to.call();\r
      return function(t) {\r
        /*tは進捗率*/\r
        if (!this.keyTime) {\r
          t = 0;\r
        } \r
        t = t / this.keyTime;\r
-       return t;\r
+       console.log(this.to.from);\r
+       return this.to.advance(t);\r
      }.bind(this);\r
    }\r
-} );\r
+} ).to = base("$from").$to;\r
 //#endif // _SMIL_IDL_\r
index ee805ce..a48b149 100644 (file)
@@ -2993,7 +2993,6 @@ describe("SMIL Animation Spec", function() {
         expect(from.strList).toBeNull();\r
         expect(from.advance(0)).toBe("");\r
         expect(from.$to.from).toBe(from.numList);\r
-        console.log(from.$to.from);\r
         expect(from.$to.advance(0)).toBe("0");       \r
         expect(from.call()).toBe(from.numList);\r
       } );\r
@@ -3102,8 +3101,8 @@ describe("SMIL Animation Spec", function() {
         to = calc.to;\r
      beforeEach( function() {\r
        calc = calc.up();\r
-       calc.to = to = to.up();\r
-       to.from = to.from.up();\r
+       calc.to = base("$from").up().mix( {string: "1"} );\r
+       calc.to.from = base("$from").up().mix( {string: "0"} );\r
      } );\r
     /*境界条件を調べておく (limit value analysis)*/\r
     it("should be this for the value  (limit value analysis)", function() {\r
@@ -3125,9 +3124,11 @@ describe("SMIL Animation Spec", function() {
       \r
       calc = base("$calcMode").up();\r
       calc.keyTime = 0.2;\r
-      to.from.string = "0s";\r
-      to.string = "1s";\r
-      to.degit = 1;\r
+      calc.to = base("$from").up();\r
+      calc.to.from = base("$from").up();    \r
+      calc.to.from.string = "0s";\r
+      calc.to.string = "1s";\r
+      calc.to.degit = 1;\r
       expect(calc.call()(0.1)).toBe("0.5s");\r
     } );\r
     /*無効同値クラスを調べておく (Equivalence partitioning, the following is the invalid partion)*/\r