Skip to content

Commit fe3ffd5

Browse files
committed
Added close and closed method
1 parent d922f05 commit fe3ffd5

File tree

5 files changed

+39
-15
lines changed

5 files changed

+39
-15
lines changed

dist/container.js

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1589,7 +1589,7 @@
15891589
var plugins = Container._plugins;
15901590
for (var i = plugins.length - 1; i >= 0; i--)
15911591
{
1592-
plugins[i].close.call(this);
1592+
plugins[i].closed.call(this);
15931593
}
15941594
}
15951595

@@ -1624,6 +1624,12 @@
16241624
{
16251625
if (this.loading || this.loaded)
16261626
{
1627+
var plugins = Container._plugins;
1628+
for (var i = plugins.length - 1; i >= 0; i--)
1629+
{
1630+
plugins[i].close.call(this);
1631+
}
1632+
16271633
/**
16281634
* Event when a application starts closing
16291635
* @event close
@@ -1742,11 +1748,17 @@
17421748
this.opened = function() {};
17431749

17441750
/**
1745-
* Called when an application is closed completely.
1751+
* Called when an application has begun to be closed.
17461752
* @method close
17471753
*/
17481754
this.close = function() {};
17491755

1756+
/**
1757+
* Called when an application is closed completely.
1758+
* @method closed
1759+
*/
1760+
this.closed = function() {};
1761+
17501762
/**
17511763
* When the Container is being destroyed. This function
17521764
* is bound to the Container. This should be overridden.
@@ -2506,8 +2518,11 @@
25062518
this.trigger('pause', paused);
25072519

25082520
// 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+
}
25112526
},
25122527
get: function()
25132528
{
@@ -2527,9 +2542,6 @@
25272542
this._isManualPause = this.paused;
25282543
};
25292544

2530-
2531-
plugin.open = function() {};
2532-
25332545
plugin.opened = function()
25342546
{
25352547
this.pauseButton.removeClass('disabled');

0 commit comments

Comments
 (0)