Skip to content

Commit

Permalink
Added onDeactivate even if animatePreviousView === false
Browse files Browse the repository at this point in the history
  • Loading branch information
SonoIo committed Oct 31, 2016
1 parent 3dd827a commit e2a1dde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion lib/viewstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,12 @@


// Hook:Deactive old active view
if ( options.animatePreviousView === true )
if ( options.animatePreviousView === true ) {
this._hookDeactive( oldActiveView, options.animated );
} else {
if (oldActiveView.onDeactivate)
oldActiveView.onDeactivate();
}

// Hook: Active new view
this._hookActivate( newView, options.animated, true );
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "backbone.viewstack",
"version": "2.1.2",
"version": "2.2.0",
"description": "View stack for Backbone",
"main": "lib/viewstack.js",
"repository": {
Expand Down

0 comments on commit e2a1dde

Please sign in to comment.