(overrides)
| 6 | var region; |
| 7 | |
| 8 | function makeItem (overrides) |
| 9 | { |
| 10 | var base = { |
| 11 | x: 0, |
| 12 | y: 0, |
| 13 | width: 100, |
| 14 | height: 100, |
| 15 | originX: 0.5, |
| 16 | originY: 0.5, |
| 17 | scaleX: 1, |
| 18 | scaleY: 1, |
| 19 | setScale: function (x, y) |
| 20 | { |
| 21 | this.scaleX = x; |
| 22 | this.scaleY = (y === undefined) ? x : y; |
| 23 | }, |
| 24 | scene: { |
| 25 | scale: { |
| 26 | width: 800, |
| 27 | height: 600 |
| 28 | } |
| 29 | } |
| 30 | }; |
| 31 | |
| 32 | if (overrides) |
| 33 | { |
| 34 | for (var key in overrides) |
| 35 | { |
| 36 | base[key] = overrides[key]; |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | return base; |
| 41 | } |
| 42 | |
| 43 | beforeEach(function () |
| 44 | { |
no outgoing calls
no test coverage detected
searching dependent graphs…