mirror of
https://github.com/pcottle/learnGitBranching.git
synced 2025-06-28 08:50:06 +02:00
Issue 106 exit button on first slide
This commit is contained in:
parent
31ad2a586b
commit
e99dce8948
10 changed files with 59 additions and 20 deletions
|
@ -10364,6 +10364,10 @@ var PositiveNegativeBase = BaseView.extend({
|
||||||
this.navEvents.trigger('positive');
|
this.navEvents.trigger('positive');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
exit: function() {
|
||||||
|
this.navEvents.trigger('exit');
|
||||||
|
},
|
||||||
|
|
||||||
negative: function() {
|
negative: function() {
|
||||||
this.navEvents.trigger('negative');
|
this.navEvents.trigger('negative');
|
||||||
}
|
}
|
||||||
|
@ -10462,9 +10466,15 @@ var LeftRightView = PositiveNegativeBase.extend({
|
||||||
template: _.template($('#left-right-template').html()),
|
template: _.template($('#left-right-template').html()),
|
||||||
events: {
|
events: {
|
||||||
'click .left': 'negative',
|
'click .left': 'negative',
|
||||||
|
'click .exit': 'exit',
|
||||||
'click .right': 'positive'
|
'click .right': 'positive'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
exit: function() {
|
||||||
|
this.pipeEvents.trigger('exit');
|
||||||
|
LeftRightView.__super__.exit.apply(this);
|
||||||
|
},
|
||||||
|
|
||||||
positive: function() {
|
positive: function() {
|
||||||
this.pipeEvents.trigger('positive');
|
this.pipeEvents.trigger('positive');
|
||||||
LeftRightView.__super__.positive.apply(this);
|
LeftRightView.__super__.positive.apply(this);
|
||||||
|
@ -14609,6 +14619,7 @@ var MultiView = Backbone.View.extend({
|
||||||
this.navEvents.on('negative', this.getNegFunc(), this);
|
this.navEvents.on('negative', this.getNegFunc(), this);
|
||||||
this.navEvents.on('positive', this.getPosFunc(), this);
|
this.navEvents.on('positive', this.getPosFunc(), this);
|
||||||
this.navEvents.on('quit', this.finish, this);
|
this.navEvents.on('quit', this.finish, this);
|
||||||
|
this.navEvents.on('exit', this.finish, this);
|
||||||
|
|
||||||
this.keyboardListener = new KeyboardListener({
|
this.keyboardListener = new KeyboardListener({
|
||||||
events: this.navEvents,
|
events: this.navEvents,
|
||||||
|
@ -30265,6 +30276,10 @@ var PositiveNegativeBase = BaseView.extend({
|
||||||
this.navEvents.trigger('positive');
|
this.navEvents.trigger('positive');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
exit: function() {
|
||||||
|
this.navEvents.trigger('exit');
|
||||||
|
},
|
||||||
|
|
||||||
negative: function() {
|
negative: function() {
|
||||||
this.navEvents.trigger('negative');
|
this.navEvents.trigger('negative');
|
||||||
}
|
}
|
||||||
|
@ -30363,9 +30378,15 @@ var LeftRightView = PositiveNegativeBase.extend({
|
||||||
template: _.template($('#left-right-template').html()),
|
template: _.template($('#left-right-template').html()),
|
||||||
events: {
|
events: {
|
||||||
'click .left': 'negative',
|
'click .left': 'negative',
|
||||||
|
'click .exit': 'exit',
|
||||||
'click .right': 'positive'
|
'click .right': 'positive'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
exit: function() {
|
||||||
|
this.pipeEvents.trigger('exit');
|
||||||
|
LeftRightView.__super__.exit.apply(this);
|
||||||
|
},
|
||||||
|
|
||||||
positive: function() {
|
positive: function() {
|
||||||
this.pipeEvents.trigger('positive');
|
this.pipeEvents.trigger('positive');
|
||||||
LeftRightView.__super__.positive.apply(this);
|
LeftRightView.__super__.positive.apply(this);
|
||||||
|
@ -31458,6 +31479,7 @@ var MultiView = Backbone.View.extend({
|
||||||
this.navEvents.on('negative', this.getNegFunc(), this);
|
this.navEvents.on('negative', this.getNegFunc(), this);
|
||||||
this.navEvents.on('positive', this.getPosFunc(), this);
|
this.navEvents.on('positive', this.getPosFunc(), this);
|
||||||
this.navEvents.on('quit', this.finish, this);
|
this.navEvents.on('quit', this.finish, this);
|
||||||
|
this.navEvents.on('exit', this.finish, this);
|
||||||
|
|
||||||
this.keyboardListener = new KeyboardListener({
|
this.keyboardListener = new KeyboardListener({
|
||||||
events: this.navEvents,
|
events: this.navEvents,
|
||||||
|
|
1
build/bundle.min.8854fb9b.js
Normal file
1
build/bundle.min.8854fb9b.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
build/bundle.min.js
vendored
2
build/bundle.min.js
vendored
File diff suppressed because one or more lines are too long
|
@ -942,15 +942,16 @@ div.gitDemonstrationView {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.leftRightView div.hideLeft i {
|
|
||||||
cursor: default;
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leftRightView div {
|
.leftRightView div {
|
||||||
margin: 0 20px;
|
margin: 0 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.leftRightView div.exit {
|
||||||
|
-webkit-transform: matrix(-1, 0, 0, 1, 0, 0);
|
||||||
|
-moz-transform: matrix(-1, 0, 0, 1, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.leftRightView div.exit,
|
||||||
.leftRightView div.left {
|
.leftRightView div.left {
|
||||||
color: rgb(253, 50, 50);
|
color: rgb(253, 50, 50);
|
||||||
text-shadow: -1px 1px 3px rgba(0,0,0,0.7);
|
text-shadow: -1px 1px 3px rgba(0,0,0,0.7);
|
||||||
|
@ -965,6 +966,7 @@ div.gitDemonstrationView {
|
||||||
color: #74FC74;
|
color: #74FC74;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.leftRightView div.exit:hover,
|
||||||
.leftRightView div.left:hover {
|
.leftRightView div.left:hover {
|
||||||
color: #FF6969;
|
color: #FF6969;
|
||||||
}
|
}
|
|
@ -13,7 +13,7 @@
|
||||||
<meta property="og:image" content="http://pcottle.github.io/learnGitBranching/assets/learnGitBranching.png"/>
|
<meta property="og:image" content="http://pcottle.github.io/learnGitBranching/assets/learnGitBranching.png"/>
|
||||||
<meta property="og:description" content="A interactive Git visualization tool to educate and challenge!"/>
|
<meta property="og:description" content="A interactive Git visualization tool to educate and challenge!"/>
|
||||||
|
|
||||||
<link rel="stylesheet" href="build/main.80cc7f4d.css" type="text/css" charset="utf-8">
|
<link rel="stylesheet" href="build/main.4c3b3cd5.css" type="text/css" charset="utf-8">
|
||||||
<link rel="stylesheet" href="src/style/font-awesome.css" type="text/css" charset="utf-8">
|
<link rel="stylesheet" href="src/style/font-awesome.css" type="text/css" charset="utf-8">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
@ -385,10 +385,11 @@
|
||||||
<script type="text/html" id="left-right-template">
|
<script type="text/html" id="left-right-template">
|
||||||
<% if (showLeft) { %>
|
<% if (showLeft) { %>
|
||||||
<div class="box left">
|
<div class="box left">
|
||||||
|
<i class="icon-circle-arrow-left"></i>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<div class="box left hideLeft">
|
<div class="box exit">
|
||||||
|
<i class="icon-signout"></i>
|
||||||
<% } %>
|
<% } %>
|
||||||
<i class="icon-circle-arrow-left"></i>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="box right">
|
<div class="box right">
|
||||||
<% if (!lastNav) { %>
|
<% if (!lastNav) { %>
|
||||||
|
@ -426,7 +427,7 @@
|
||||||
For a much easier time perusing the source, see the individual files at:
|
For a much easier time perusing the source, see the individual files at:
|
||||||
https://github.com/pcottle/learnGitBranching
|
https://github.com/pcottle/learnGitBranching
|
||||||
-->
|
-->
|
||||||
<script src="build/bundle.min.e82289be.js"></script>
|
<script src="build/bundle.min.8854fb9b.js"></script>
|
||||||
|
|
||||||
<!-- The advantage of github pages: super-easy, simple, slick static hostic.
|
<!-- The advantage of github pages: super-easy, simple, slick static hostic.
|
||||||
The downside? No raw logs to parse for analytics, so I have to include
|
The downside? No raw logs to parse for analytics, so I have to include
|
||||||
|
|
|
@ -50,6 +50,10 @@ var PositiveNegativeBase = BaseView.extend({
|
||||||
this.navEvents.trigger('positive');
|
this.navEvents.trigger('positive');
|
||||||
},
|
},
|
||||||
|
|
||||||
|
exit: function() {
|
||||||
|
this.navEvents.trigger('exit');
|
||||||
|
},
|
||||||
|
|
||||||
negative: function() {
|
negative: function() {
|
||||||
this.navEvents.trigger('negative');
|
this.navEvents.trigger('negative');
|
||||||
}
|
}
|
||||||
|
@ -148,9 +152,15 @@ var LeftRightView = PositiveNegativeBase.extend({
|
||||||
template: _.template($('#left-right-template').html()),
|
template: _.template($('#left-right-template').html()),
|
||||||
events: {
|
events: {
|
||||||
'click .left': 'negative',
|
'click .left': 'negative',
|
||||||
|
'click .exit': 'exit',
|
||||||
'click .right': 'positive'
|
'click .right': 'positive'
|
||||||
},
|
},
|
||||||
|
|
||||||
|
exit: function() {
|
||||||
|
this.pipeEvents.trigger('exit');
|
||||||
|
LeftRightView.__super__.exit.apply(this);
|
||||||
|
},
|
||||||
|
|
||||||
positive: function() {
|
positive: function() {
|
||||||
this.pipeEvents.trigger('positive');
|
this.pipeEvents.trigger('positive');
|
||||||
LeftRightView.__super__.positive.apply(this);
|
LeftRightView.__super__.positive.apply(this);
|
||||||
|
|
|
@ -57,6 +57,7 @@ var MultiView = Backbone.View.extend({
|
||||||
this.navEvents.on('negative', this.getNegFunc(), this);
|
this.navEvents.on('negative', this.getNegFunc(), this);
|
||||||
this.navEvents.on('positive', this.getPosFunc(), this);
|
this.navEvents.on('positive', this.getPosFunc(), this);
|
||||||
this.navEvents.on('quit', this.finish, this);
|
this.navEvents.on('quit', this.finish, this);
|
||||||
|
this.navEvents.on('exit', this.finish, this);
|
||||||
|
|
||||||
this.keyboardListener = new KeyboardListener({
|
this.keyboardListener = new KeyboardListener({
|
||||||
events: this.navEvents,
|
events: this.navEvents,
|
||||||
|
|
|
@ -942,15 +942,16 @@ div.gitDemonstrationView {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.leftRightView div.hideLeft i {
|
|
||||||
cursor: default;
|
|
||||||
opacity: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.leftRightView div {
|
.leftRightView div {
|
||||||
margin: 0 20px;
|
margin: 0 60px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.leftRightView div.exit {
|
||||||
|
-webkit-transform: matrix(-1, 0, 0, 1, 0, 0);
|
||||||
|
-moz-transform: matrix(-1, 0, 0, 1, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.leftRightView div.exit,
|
||||||
.leftRightView div.left {
|
.leftRightView div.left {
|
||||||
color: rgb(253, 50, 50);
|
color: rgb(253, 50, 50);
|
||||||
text-shadow: -1px 1px 3px rgba(0,0,0,0.7);
|
text-shadow: -1px 1px 3px rgba(0,0,0,0.7);
|
||||||
|
@ -965,6 +966,7 @@ div.gitDemonstrationView {
|
||||||
color: #74FC74;
|
color: #74FC74;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.leftRightView div.exit:hover,
|
||||||
.leftRightView div.left:hover {
|
.leftRightView div.left:hover {
|
||||||
color: #FF6969;
|
color: #FF6969;
|
||||||
}
|
}
|
||||||
|
|
|
@ -385,10 +385,11 @@
|
||||||
<script type="text/html" id="left-right-template">
|
<script type="text/html" id="left-right-template">
|
||||||
<% if (showLeft) { %>
|
<% if (showLeft) { %>
|
||||||
<div class="box left">
|
<div class="box left">
|
||||||
|
<i class="icon-circle-arrow-left"></i>
|
||||||
<% } else { %>
|
<% } else { %>
|
||||||
<div class="box left hideLeft">
|
<div class="box exit">
|
||||||
|
<i class="icon-signout"></i>
|
||||||
<% } %>
|
<% } %>
|
||||||
<i class="icon-circle-arrow-left"></i>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="box right">
|
<div class="box right">
|
||||||
<% if (!lastNav) { %>
|
<% if (!lastNav) { %>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue