diff --git a/resources/assets/js/annotations/annotatorContainer.vue b/resources/assets/js/annotations/annotatorContainer.vue index 5d2b3bb33..84a25b7ab 100644 --- a/resources/assets/js/annotations/annotatorContainer.vue +++ b/resources/assets/js/annotations/annotatorContainer.vue @@ -87,6 +87,7 @@ export default { userUpdatedVolareResolution: false, userId: null, crossOriginError: false, + imageFilenames: {} }; }, computed: { @@ -682,6 +683,7 @@ export default { this.volumeId = biigle.$require('annotations.volumeId'); this.isEditor = biigle.$require('annotations.isEditor'); this.userId = biigle.$require('annotations.userId'); + this.imageFilenames = biigle.$require('annotations.imagesFilenames'); this.annotationFilters = [ new LabelFilter(), new UserFilter(), diff --git a/resources/assets/js/annotations/components/screenshotButton.vue b/resources/assets/js/annotations/components/screenshotButton.vue index 94c58babc..1be2f9765 100644 --- a/resources/assets/js/annotations/components/screenshotButton.vue +++ b/resources/assets/js/annotations/components/screenshotButton.vue @@ -9,16 +9,29 @@ import Keyboard from '../../core/keyboard'; * @type {Object} */ export default { + props: { + filenames: { + type: Array, + default: () => [], + }, + currentId: { + type: Number, + default: -1, + }, + ids: { + type: Array, + default: () => [] + } + }, data() { return { - filenames: {}, - currentId: null, - }; + filesObj: {} + } }, computed: { filename() { if (this.currentId) { - let name = this.filenames[this.currentId].split('.'); + let name = this.filesObj[this.currentId].split('.'); if (name.length > 1) { name[name.length - 1] = 'png'; } @@ -145,21 +158,14 @@ export default { setMap(map) { this.map = map; }, - updateCurrentId(id) { - this.currentId = id; - }, }, created() { - let ids = biigle.$require('annotations.imagesIds'); - let filenames = {}; - biigle.$require('annotations.imagesFilenames').forEach((filename, index) => { - filenames[ids[index]] = filename; + this.filenames.forEach((filename, index) => { + this.filesObj[this.ids[index]] = filename; }); - this.filenames = filenames; - this.currentId = biigle.$require('annotations.imageId'); - Events.$on('images.change', this.updateCurrentId); - Events.$on('annotations.map.init', this.setMap); + Keyboard.on('p', this.capture); + Events.$on(['annotations.map.init', 'videos.map.init'], this.setMap); }, }; diff --git a/resources/assets/js/annotations/components/settingsTab.vue b/resources/assets/js/annotations/components/settingsTab.vue index 71056c1c5..a9ee206bf 100644 --- a/resources/assets/js/annotations/components/settingsTab.vue +++ b/resources/assets/js/annotations/components/settingsTab.vue @@ -30,6 +30,18 @@ export default { type: Object, default: null, }, + imageFilenames: { + type: Array, + default: () => [], + }, + currentId: { + type: Number, + default: -1, + }, + ids: { + type: Array, + default: () => [] + } }, data() { return { diff --git a/resources/assets/js/videos/components/settingsTab.vue b/resources/assets/js/videos/components/settingsTab.vue index 743d8b900..882ce68b2 100644 --- a/resources/assets/js/videos/components/settingsTab.vue +++ b/resources/assets/js/videos/components/settingsTab.vue @@ -1,17 +1,39 @@ diff --git a/resources/views/annotations/show/tabs/settings.blade.php b/resources/views/annotations/show/tabs/settings.blade.php index 7e38553f7..6debfe9aa 100644 --- a/resources/views/annotations/show/tabs/settings.blade.php +++ b/resources/views/annotations/show/tabs/settings.blade.php @@ -1,9 +1,22 @@ - +
diff --git a/resources/views/manual/tutorials/videos/shortcuts.blade.php b/resources/views/manual/tutorials/videos/shortcuts.blade.php index 1a45e9818..f9a1b24c6 100644 --- a/resources/views/manual/tutorials/videos/shortcuts.blade.php +++ b/resources/views/manual/tutorials/videos/shortcuts.blade.php @@ -123,6 +123,9 @@ c Select last created annotation + + p + Capture a screenshot Ctrl+k Open label trees sidebar and focus the find label input field diff --git a/resources/views/videos/show/sidebar-settings.blade.php b/resources/views/videos/show/sidebar-settings.blade.php index 8bfef31b0..15099ac81 100644 --- a/resources/views/videos/show/sidebar-settings.blade.php +++ b/resources/views/videos/show/sidebar-settings.blade.php @@ -2,8 +2,24 @@
+