Fixed issues with sound not playing and skip back not working
This commit is contained in:
parent
12c1a1d387
commit
e7e13a623a
1 changed files with 6 additions and 11 deletions
13
js/app.js
13
js/app.js
|
@ -112,8 +112,8 @@ if (!window.indexedDB) {
|
||||||
$scope.newTimerClosed = false;
|
$scope.newTimerClosed = false;
|
||||||
$scope.showTimerInterface = false;
|
$scope.showTimerInterface = false;
|
||||||
$scope.setPeriod = function(period, playBeep) {
|
$scope.setPeriod = function(period, playBeep) {
|
||||||
if (typeof period == "undefined") {
|
if (typeof playBeep == "undefined") {
|
||||||
period = true;
|
playBeep = true;
|
||||||
}
|
}
|
||||||
clearInterval($scope.countdown);
|
clearInterval($scope.countdown);
|
||||||
$scope[period].active = true;
|
$scope[period].active = true;
|
||||||
|
@ -240,15 +240,8 @@ if (!window.indexedDB) {
|
||||||
};
|
};
|
||||||
$scope.stepBack = function() {
|
$scope.stepBack = function() {
|
||||||
if ($scope.warmUp.active) {
|
if ($scope.warmUp.active) {
|
||||||
if ($scope.cycle > 1) {
|
|
||||||
$scope.warmUp.active = false;
|
|
||||||
$scope.cycle--;
|
|
||||||
$scope.setPeriod('highIntensity');
|
|
||||||
return;
|
|
||||||
} else {
|
|
||||||
$scope.resetTimer();
|
$scope.resetTimer();
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
};
|
};
|
||||||
if ($scope.lowIntensity.active) {
|
if ($scope.lowIntensity.active) {
|
||||||
$scope.lowIntensity.active = false;
|
$scope.lowIntensity.active = false;
|
||||||
|
@ -271,6 +264,8 @@ if (!window.indexedDB) {
|
||||||
};
|
};
|
||||||
if ($scope.rest.active) {
|
if ($scope.rest.active) {
|
||||||
$scope.rest.active = false;
|
$scope.rest.active = false;
|
||||||
|
$scope.cycle--;
|
||||||
|
$scope.round = $scope.timer.rounds;
|
||||||
$scope.setPeriod('highIntensity');
|
$scope.setPeriod('highIntensity');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue