(container, view, backwards)
| 30 | this.view = null; |
| 31 | } |
| 32 | display(container, view, backwards) { |
| 33 | if (this.view) { |
| 34 | this.onScreenUndisplaying(container, this.view); |
| 35 | if (backwards) |
| 36 | this.view.runTransitionBackwards(view); |
| 37 | else { |
| 38 | if (this.view.historical) |
| 39 | this.history.push(this.view); |
| 40 | view.runTransitionForwards(this.view); |
| 41 | } |
| 42 | } |
| 43 | else { |
| 44 | this.container.add(new view.Template(view)); |
| 45 | this.going = 0; |
| 46 | this.onScreenDisplayed(container, view); |
| 47 | } |
| 48 | this.view = view; |
| 49 | if (this.forgottenHistory) { |
| 50 | this.history.length = this.forgottenHistory; |
| 51 | this.forgottenHistory = 0; |
| 52 | } |
| 53 | trace("HISTORY:"); |
| 54 | this.history.forEach(view => trace(" " + view.id)); |
| 55 | trace("\n"); |
| 56 | } |
| 57 | forgetHistory(forgottenHistory = 1) { |
| 58 | this.forgottenHistory = forgottenHistory; |
| 59 | } |
no test coverage detected