diff --git a/src/app/citizenScience/bristlebird/bristlebird.js b/src/app/citizenScience/bristlebird/bristlebird.js index 00451970..bf42ae74 100644 --- a/src/app/citizenScience/bristlebird/bristlebird.js +++ b/src/app/citizenScience/bristlebird/bristlebird.js @@ -91,6 +91,10 @@ class BristlebirdController { this.showAudio = CitizenScienceCommon.bindShowAudio($scope); + + + + /** * Sets the current sample to sampleNum * @param sample_num int the index of the samples array of json objects @@ -126,14 +130,15 @@ class BristlebirdController { /** * auto play feature * when the playback arrives at the end of the audio, it will proceed to the next segment. - * @TODO: fix bug where it goes to the next segment at the end of a label example */ - $scope.$on(ngAudioEvents.ended, function navigate(event) { - var nextSampleNum = $scope.currentSampleNum + 1; - console.info("Changing page to next segment, which is segment " + nextSampleNum); - $scope.$safeApply($scope, function () { - $scope.goToSample(nextSampleNum); - }); + $scope.$on(ngAudioEvents.ended, function navigate(event, model) { + if (model === $scope.model.audioElement) { + var nextSampleNum = $scope.currentSampleNum + 1; + console.info("Changing page to next segment, which is segment " + nextSampleNum); + $scope.$safeApply($scope, function () { + $scope.goToSample(nextSampleNum); + }); + } }); } diff --git a/src/app/citizenScience/examples/_examples.scss b/src/app/citizenScience/examples/_examples.scss index 56613a1d..2095f27c 100644 --- a/src/app/citizenScience/examples/_examples.scss +++ b/src/app/citizenScience/examples/_examples.scss @@ -1,6 +1,7 @@ .examples-container { text-align: center; + margin-top: 10px; } @@ -11,11 +12,11 @@ padding: 8px; min-width: 410px; - background: #ffffff; + background: rgba(255,255,255,0.9); border-radius: 5px; - -webkit-box-shadow: 3x 3px 5px rgba(0,0,0,0.3); - -moz-box-shadow: 3x 3px 5px rgba(0,0,0,0.3); - box-shadow: 3x 3px 5px rgba(0,0,0,0.3); + -webkit-box-shadow: 3px 3px 5px rgba(0,0,0,0.3); + -moz-box-shadow: 3px 3px 5px rgba(0,0,0,0.3); + box-shadow: 3px 3px 5px rgba(0,0,0,0.3); &.selected { diff --git a/src/components/directives/ngAudio.js b/src/components/directives/ngAudio.js index dcd34b41..7fc567be 100644 --- a/src/components/directives/ngAudio.js +++ b/src/components/directives/ngAudio.js @@ -174,7 +174,7 @@ angular.module("bawApp.directives.ngAudio", [ updateState(event); console.debug("ngAudio:audioEvent:ended"); - scope.$emit(ngAudioEvents.ended, null); + scope.$emit(ngAudioEvents.ended, target); }, "error": function (event) { console.error("ngAudio:audioElement:errorEvent", event);