ブラウザでSVGを表示するSIEの開発 (SIE - to display SVG on legacy browsers)
| リビジョン | c73ce92b05bef13a01fc08a35bb2450221abfa38 (tree) |
|---|---|
| 日時 | 2015-09-03 22:55:35 |
| 作者 | dhrname <dhrname@user...> |
| コミッター | dhrname |
Modify a listener method of the object
| @@ -321,6 +321,11 @@ base("$frame").mix ( { | ||
| 321 | 321 | s.begin = this.begin; |
| 322 | 322 | this.activeTime = s.call(); |
| 323 | 323 | this.simpleDuration = s.simpleDur; |
| 324 | + if (!this.isResolved && (this.activeTime !== 0)) { | |
| 325 | + /*イベントでこのリスナーが呼び出されたとき | |
| 326 | + * 活動継続時間が未定義でも、set要素はアニメーションを開始する*/ | |
| 327 | + this.activeTime = this.activeTime || this.$frame.activeTime; | |
| 328 | + } | |
| 324 | 329 | s = void 0; |
| 325 | 330 | this.$frame.addLine(this); |
| 326 | 331 | } |
| @@ -2442,6 +2442,7 @@ describe("SMIL Animation Spec", function() { | ||
| 2442 | 2442 | } ); |
| 2443 | 2443 | /*境界条件を調べておく (limit value analysis)*/ |
| 2444 | 2444 | it("should be this for the value (limit value analysis)", function() { |
| 2445 | + obj.isResolved = true; | |
| 2445 | 2446 | obj.listener(); |
| 2446 | 2447 | expect(obj.begin).toBe(0); |
| 2447 | 2448 |
| @@ -2451,7 +2452,17 @@ describe("SMIL Animation Spec", function() { | ||
| 2451 | 2452 | expect(obj.begin).toBe(0); |
| 2452 | 2453 | expect(obj.activeTime).toBeNull(); |
| 2453 | 2454 | expect(obj.timelines.length).toBe(0); |
| 2454 | - | |
| 2455 | + | |
| 2456 | + obj.isResolved = false; | |
| 2457 | + obj.listener( { | |
| 2458 | + timeStamp: Date.now() | |
| 2459 | + } ); | |
| 2460 | + expect(obj.begin).toBe(0); | |
| 2461 | + expect(obj.activeTime).toBe(base("$frame").activeTime); | |
| 2462 | + expect(obj.timelines.length).toBe(1); | |
| 2463 | + /*配列を初期化*/ | |
| 2464 | + obj.timelines.length = 0; | |
| 2465 | + | |
| 2455 | 2466 | obj.up().mix( { |
| 2456 | 2467 | begin: 1, |
| 2457 | 2468 | eventOffset: 1, |