From 50b44c741a07d9a91c05e624e7aec423d22a02c6 Mon Sep 17 00:00:00 2001 From: dhrname Date: Fri, 6 Mar 2015 23:10:45 +0900 Subject: [PATCH] Add a from property to the object --- org/w3c/dom/smil.js | 24 +++++++++++--------- tool/Spec/spec/SvgDomSpec.js | 53 ++++++++++++++++++++++++++++++-------------- 2 files changed, 50 insertions(+), 27 deletions(-) diff --git a/org/w3c/dom/smil.js b/org/w3c/dom/smil.js index b24eaaf..55429ed 100644 --- a/org/w3c/dom/smil.js +++ b/org/w3c/dom/smil.js @@ -460,13 +460,13 @@ base("$from").of( { strList: function() { return this.string.match(/[^\d\-\+\.eE]+/g); }, - - /*計算モード。advanceメソッドで時間の圧縮率を求めるのに使う*/ - calc: base("$calcMode"), + + from: base("$from").up().mix( { + from: null + } ), /*$toオブジェクトにこのオブジェクトを適用させる関数*/ call: function() { - this.$to.from = this; /*文字部分の配置パターンは4通りあるので、ここでstrListを処理 * (1) a 0 の場合 * (2) 0 a @@ -504,13 +504,12 @@ base("$from").of( { if (!this.string || !this.from) { return ""; } - /*時間の圧縮率をもとに変換 ($calcMode オブジェクトを参照)*/ - t = this.calc(t); var str = "", numList = this.numList, strList = this.strList, - fromNumList = this.from.numList, + fromNumList = this.from, deg = this.degit; + for (var i=0,nuli=numList.length;i