|
1589 | 1589 | var plugins = Container._plugins;
|
1590 | 1590 | for (var i = plugins.length - 1; i >= 0; i--)
|
1591 | 1591 | {
|
1592 |
| - plugins[i].close.call(this); |
| 1592 | + plugins[i].closed.call(this); |
1593 | 1593 | }
|
1594 | 1594 | }
|
1595 | 1595 |
|
|
1624 | 1624 | {
|
1625 | 1625 | if (this.loading || this.loaded)
|
1626 | 1626 | {
|
| 1627 | + var plugins = Container._plugins; |
| 1628 | + for (var i = plugins.length - 1; i >= 0; i--) |
| 1629 | + { |
| 1630 | + plugins[i].close.call(this); |
| 1631 | + } |
| 1632 | + |
1627 | 1633 | /**
|
1628 | 1634 | * Event when a application starts closing
|
1629 | 1635 | * @event close
|
|
1742 | 1748 | this.opened = function() {};
|
1743 | 1749 |
|
1744 | 1750 | /**
|
1745 |
| - * Called when an application is closed completely. |
| 1751 | + * Called when an application has begun to be closed. |
1746 | 1752 | * @method close
|
1747 | 1753 | */
|
1748 | 1754 | this.close = function() {};
|
1749 | 1755 |
|
| 1756 | + /** |
| 1757 | + * Called when an application is closed completely. |
| 1758 | + * @method closed |
| 1759 | + */ |
| 1760 | + this.closed = function() {}; |
| 1761 | + |
1750 | 1762 | /**
|
1751 | 1763 | * When the Container is being destroyed. This function
|
1752 | 1764 | * is bound to the Container. This should be overridden.
|
|
2506 | 2518 | this.trigger('pause', paused);
|
2507 | 2519 |
|
2508 | 2520 | // Set the pause button state
|
2509 |
| - this.pauseButton.removeClass('unpaused paused') |
2510 |
| - .addClass(paused ? 'paused' : 'unpaused'); |
| 2521 | + if (this.pauseButton) |
| 2522 | + { |
| 2523 | + this.pauseButton.removeClass('unpaused paused') |
| 2524 | + .addClass(paused ? 'paused' : 'unpaused'); |
| 2525 | + } |
2511 | 2526 | },
|
2512 | 2527 | get: function()
|
2513 | 2528 | {
|
|
2527 | 2542 | this._isManualPause = this.paused;
|
2528 | 2543 | };
|
2529 | 2544 |
|
2530 |
| - |
2531 |
| - plugin.open = function() {}; |
2532 |
| - |
2533 | 2545 | plugin.opened = function()
|
2534 | 2546 | {
|
2535 | 2547 | this.pauseButton.removeClass('disabled');
|
|
0 commit comments