Skip to content

Commit

Permalink
Listen to last annotation event in videoContainer
Browse files Browse the repository at this point in the history
  • Loading branch information
lehecht committed Nov 4, 2024
1 parent 17ce783 commit 3954fdb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 0 additions & 4 deletions resources/assets/js/videos/components/videoScreen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -572,9 +572,6 @@ export default {
Keyboard.on('ArrowLeft', this.emitPrevious, 0, this.listenerSet);
}
},
emitSelectLastAnnotation() {
this.$emit('select-last-annotation');
}
},
watch: {
selectedAnnotations(annotations) {
Expand Down Expand Up @@ -640,7 +637,6 @@ export default {
Keyboard.on('Escape', this.resetInteractionMode, 0, this.listenerSet);
Keyboard.on('Control+ArrowRight', this.jumpForward, 0, this.listenerSet);
Keyboard.on('Control+ArrowLeft', this.jumpBackward, 0, this.listenerSet);
Keyboard.on('Control', this.emitSelectLastAnnotation, 0, this.listenerSet);
},
mounted() {
this.map.setTarget(this.$el);
Expand Down
3 changes: 3 additions & 0 deletions resources/assets/js/videos/videoContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import VideoApi from './api/videos';
import VideoLabelsTab from './components/videoLabelsTab';
import VideoScreen from './components/videoScreen';
import VideoTimeline from './components/videoTimeline';
import Keyboard from '../core/keyboard';
import {handleErrorResponse} from '../core/messages/store';
import {urlParams as UrlParams} from '../core/utils';
Expand Down Expand Up @@ -728,6 +729,8 @@ export default {
this.video.addEventListener('pause', this.updateVideoUrlParams);
this.video.addEventListener('seeked', this.updateVideoUrlParams);
Keyboard.on('Control', this.selectLastAnnotation, 0, this.listenerSet);
if (Settings.has('openTab')) {
this.openTab = Settings.get('openTab');
}
Expand Down
1 change: 0 additions & 1 deletion resources/views/videos/show/content.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@
v-on:seek="seek"
v-on:start-seeking="startSeeking"
v-on:is-invalid-shape="handleInvalidShape"
v-on:select-last-annotation="selectLastAnnotation"
></video-screen>
<video-timeline
ref="videoTimeline"
Expand Down

0 comments on commit 3954fdb

Please sign in to comment.