reset practice failure state on backward button - closes #2727
This commit is contained in:
parent
d3d4f3f6d6
commit
b61a774bf6
|
@ -65,6 +65,7 @@ module.exports = function(root, studyData, data) {
|
|||
};
|
||||
|
||||
var onFailure = function() {
|
||||
root.vm.node.fail = true;
|
||||
sound.failure();
|
||||
};
|
||||
|
||||
|
@ -77,7 +78,11 @@ module.exports = function(root, studyData, data) {
|
|||
|
||||
return {
|
||||
onReload: onLoad,
|
||||
onJump: checkSuccess,
|
||||
onJump: function() {
|
||||
// reset failure state if no failed move found in mainline history
|
||||
if (success() === false && !root.vm.nodeList.find(function(n) { return n.fail; })) success(null);
|
||||
checkSuccess();
|
||||
},
|
||||
onCeval: checkSuccess,
|
||||
data: data,
|
||||
goal: goal,
|
||||
|
|
Loading…
Reference in a new issue