ブラウザでSVGを表示するSIEの開発 (SIE - to display SVG on legacy browsers)
| リビジョン | 9a229c8542176fc96c54a841db2db3d27e0be299 (tree) |
|---|---|
| 日時 | 2015-10-13 21:40:15 |
| 作者 | dhrname <dhrname@user...> |
| コミッター | dhrname |
Support for the id.begin / id.end syntax
| @@ -1235,13 +1235,12 @@ base("$frame").up("$svgEvent").mix( { | ||
| 1235 | 1235 | } |
| 1236 | 1236 | }; |
| 1237 | 1237 | if (obj) { |
| 1238 | - obj.next = first; | |
| 1238 | + obj = obj.next.next.next = first; | |
| 1239 | 1239 | } else { |
| 1240 | 1240 | this.first = first; |
| 1241 | 1241 | obj = first; |
| 1242 | 1242 | } |
| 1243 | 1243 | } |
| 1244 | - console.log(this.first); | |
| 1245 | 1244 | } |
| 1246 | 1245 | timelines = obj = void 0; |
| 1247 | 1246 | }, |
| @@ -4195,7 +4195,7 @@ describe("SMIL Animation Spec", function() { | ||
| 4195 | 4195 | } ); |
| 4196 | 4196 | } ); |
| 4197 | 4197 | describe("$frame.$svgEvent object", function() { |
| 4198 | - var frame = base("$frame").$svgEvent, | |
| 4198 | + var frame = base("$frame").$svgEvent.up(), | |
| 4199 | 4199 | p, ele; |
| 4200 | 4200 | beforeEach( function() { |
| 4201 | 4201 | base("$frame").timelines = frame.timelines = []; |
| @@ -4210,7 +4210,7 @@ describe("SMIL Animation Spec", function() { | ||
| 4210 | 4210 | expect(frame.first).toBeNull(); |
| 4211 | 4211 | frame.setTimeTable(0); |
| 4212 | 4212 | expect(frame.first).toBeNull(); |
| 4213 | - base("$frame").addLine( base("$frame").$begin.up().mix({ | |
| 4213 | + frame.addLine( base("$frame").$begin.up().mix({ | |
| 4214 | 4214 | timelines: [], |
| 4215 | 4215 | begin: 0, |
| 4216 | 4216 | activeTime: 0, |
| @@ -4239,7 +4239,7 @@ describe("SMIL Animation Spec", function() { | ||
| 4239 | 4239 | } ); |
| 4240 | 4240 | /*同値分割をして、有効同値クラスを調べておく (Equivalence partitioning, the following is the valid partion)*/ |
| 4241 | 4241 | it("should be this for the value (the valid partion )", function() { |
| 4242 | - base("$frame").addLine( base("$frame").$begin.up().mix({ | |
| 4242 | + frame.addLine( base("$frame").$begin.up().mix({ | |
| 4243 | 4243 | timelines: [], |
| 4244 | 4244 | begin: 0, |
| 4245 | 4245 | activeTime: 0, |
| @@ -4302,17 +4302,15 @@ describe("SMIL Animation Spec", function() { | ||
| 4302 | 4302 | frame.setFrame(0); |
| 4303 | 4303 | expect(frame.first).toBeNull(); |
| 4304 | 4304 | |
| 4305 | - base("$frame").timelines = []; | |
| 4306 | - delete frame.timelines; | |
| 4307 | - base("$frame").addLine( base("$frame").$begin.up().mix({ | |
| 4305 | + frame.timelines = []; | |
| 4306 | + frame.addLine( base("$frame").$begin.up().mix({ | |
| 4308 | 4307 | timelines: [], |
| 4309 | 4308 | begin: 0, |
| 4310 | 4309 | activeTime: 10, |
| 4311 | 4310 | target: ele |
| 4312 | 4311 | }) ); |
| 4313 | 4312 | frame.setTimeTable(0); |
| 4314 | - expect(frame.first).toEqual( | |
| 4315 | - { frame: 0, | |
| 4313 | + var a = { frame: 0, | |
| 4316 | 4314 | eventType: "begin", |
| 4317 | 4315 | target: ele, |
| 4318 | 4316 |
| @@ -4328,8 +4326,35 @@ describe("SMIL Animation Spec", function() { | ||
| 4328 | 4326 | next: null |
| 4329 | 4327 | } |
| 4330 | 4328 | } |
| 4331 | - } | |
| 4332 | - ); | |
| 4329 | + }; | |
| 4330 | + expect(frame.first).toEqual(a); | |
| 4331 | + | |
| 4332 | + frame.addLine( base("$frame").$begin.up().mix({ | |
| 4333 | + timelines: [], | |
| 4334 | + begin: 0, | |
| 4335 | + activeTime: 11, | |
| 4336 | + target: ele | |
| 4337 | + }) ); | |
| 4338 | + console.log(frame.timelines); | |
| 4339 | + frame.setTimeTable(0); | |
| 4340 | + a.next.next.next = { frame: 0, | |
| 4341 | + eventType: "begin", | |
| 4342 | + target: ele, | |
| 4343 | + | |
| 4344 | + next: { frame: 0, | |
| 4345 | + eventType: "repeat", | |
| 4346 | + limit: 0, | |
| 4347 | + simpleDuration: 0, | |
| 4348 | + target: ele, | |
| 4349 | + | |
| 4350 | + next: { frame: 11, | |
| 4351 | + eventType: "end", | |
| 4352 | + target: ele, | |
| 4353 | + next: null | |
| 4354 | + } | |
| 4355 | + } | |
| 4356 | + }; | |
| 4357 | + expect(frame.first).toEqual(a); | |
| 4333 | 4358 | } ); |
| 4334 | 4359 | } ); |
| 4335 | 4360 | describe("Event", function() { |