mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-07-03 03:04:27 +02:00
button clicking and left right nav integration for git demonstration view
This commit is contained in:
parent
0c4319911e
commit
e0c4ac795b
5 changed files with 143 additions and 14 deletions
|
@ -95,7 +95,17 @@ var MultiView = Backbone.View.extend({
|
|||
}, this), this.navEventDebounce, true);
|
||||
},
|
||||
|
||||
lock: function() {
|
||||
this.locked = true;
|
||||
},
|
||||
|
||||
unlock: function() {
|
||||
this.locked = false;
|
||||
},
|
||||
|
||||
navForward: function() {
|
||||
// we need to prevent nav changes when a git demonstration view hasnt finished
|
||||
if (this.locked) { return; }
|
||||
if (this.currentIndex === this.childViews.length - 1) {
|
||||
this.hideViewIndex(this.currentIndex);
|
||||
this.finish();
|
||||
|
@ -166,6 +176,9 @@ var MultiView = Backbone.View.extend({
|
|||
showLeft: (index !== 0),
|
||||
lastNav: (index === this.childViewJSONs.length - 1)
|
||||
});
|
||||
if (view.receiveMetaNav) {
|
||||
view.receiveMetaNav(leftRight, this);
|
||||
}
|
||||
},
|
||||
|
||||
render: function() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue