Skip to content

Commit

Permalink
Call method onActivation after popped view
Browse files Browse the repository at this point in the history
  • Loading branch information
vash15 committed Jun 25, 2014
1 parent d77d52a commit d0e096b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backbone.viewstack",
"version": "0.0.6",
"version": "0.0.7",
"homepage": "https://github.com/vash15/backbone.viewstack",
"authors": [
"Michele Belluco <[email protected]>"
Expand Down
9 changes: 6 additions & 3 deletions lib/viewstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,11 +161,14 @@ var ViewStack = module.exports = BackBone.View.extend({
popped.trigger("deactive");
}

// Assegno la nuova view corrente
this._current = this._stack[ this._stack.length-1 ];

// Stack replace
if ( this._stackReplace.length > 0 ){
this.pushView( this._stackReplace.pop() );
}else{
// Assegno la nuova view corrente
this._current = this._stack[ this._stack.length-1 ];
if ( this._current && this._current.onActivate )
this._current.onActivate();
}

this
Expand Down

0 comments on commit d0e096b

Please sign in to comment.