pagination
This commit is contained in:
@@ -3,6 +3,7 @@ AFRAME.registerComponent('keyboard-raycastable', {
|
||||
|
||||
play: function () {
|
||||
// TODO: bind-toggle__raycastable for when search is activated.
|
||||
this.el.components['super-keyboard'].kbImg.setAttribute('raycastable', '');
|
||||
this.el.components['super-keyboard'].kbImg.setAttribute('bind-toggle__raycastable',
|
||||
'menu.active');
|
||||
},
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ var bindEvent = require('aframe-event-decorators').bindEvent;
|
||||
AFRAME.registerComponent('menu-difficulty-select', {
|
||||
click: bindEvent(function (evt) {
|
||||
this.el.emit('menudifficultyselect',
|
||||
evt.target.closest('difficultyOption').dataset.difficulty,
|
||||
evt.target.closest('.difficultyOption').dataset.difficulty,
|
||||
false);
|
||||
})
|
||||
});
|
||||
|
||||
@@ -34,17 +34,19 @@ AFRAME.registerComponent('preview-song', {
|
||||
// Stop.
|
||||
if (oldData.challengeId && !this.data.challengeId) {
|
||||
if (this.animation) { this.animation.pause(); }
|
||||
this.audio.pause();
|
||||
if (!this.audio.paused) { this.audio.pause(); }
|
||||
this.audio.src = '';
|
||||
return;
|
||||
}
|
||||
|
||||
// Play preview.
|
||||
this.audio.currentTime = this.data.previewStartTime;
|
||||
this.audio.src = utils.getS3FileUrl(this.data.challengeId, 'song.ogg');
|
||||
this.audio.volume = 0;
|
||||
this.volumeTarget.volume = 0;
|
||||
this.audio.play();
|
||||
this.animation.restart();
|
||||
if (this.data.challengeId) {
|
||||
this.audio.currentTime = this.data.previewStartTime;
|
||||
this.audio.src = utils.getS3FileUrl(this.data.challengeId, 'song.ogg');
|
||||
this.audio.volume = 0;
|
||||
this.volumeTarget.volume = 0;
|
||||
this.audio.play();
|
||||
this.animation.restart();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user