Skip to content

Commit

Permalink
Rename method for more clarity
Browse files Browse the repository at this point in the history
  • Loading branch information
lehecht committed Jul 14, 2023
1 parent e907066 commit 2d32a75
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions resources/assets/js/annotations/annotatorContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ export default {
if (this.isEditor) {
if (annotation.labels.length > 1) {
AnnotationsStore.detachLabel(annotation, annotationLabel)
.then(() => this.refreshAnnotation(annotation))
.then(() => this.refreshSingleAnnotation(annotation))
.catch(handleErrorResponse);
} else if (confirm('Detaching the last label of an annotation deletes the whole annotation. Do you want to delete the annotation?')) {
this.handleDeleteAnnotation(annotation);
Expand Down Expand Up @@ -450,8 +450,8 @@ export default {
.catch(handleErrorResponse);
}
},
refreshAnnotation(annotation){
this.$refs.canvas.refreshAnnotation(annotation);
refreshSingleAnnotation(annotation){
this.$refs.canvas.refreshSingleAnnotation(annotation);
},
handleAttachAllSelected() {
this.selectedAnnotations.forEach(this.handleAttachLabel);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ export default {
updateMousePosition(e) {
this.mousePosition = e.coordinate;
},
refreshAnnotation(annotation) {
refreshSingleAnnotation(annotation) {
let source = this.annotationSource;
let newFeature = this.createFeature(annotation);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default {
},
},
methods: {
refreshAnnotations(time) {
refreshAllAnnotations(time) {
let source = this.annotationSource;
let selected = this.selectedFeatures;
let annotations = this.annotationsPreparedToRender;
Expand Down Expand Up @@ -126,7 +126,7 @@ export default {
this.updateGeometry(feature, time);
});
},
refreshAnnotation(annotation) {
refreshSingleAnnotation(annotation) {
let source = this.annotationSource;
let newFeature = this.createFeature(annotation);
Expand Down Expand Up @@ -237,10 +237,10 @@ export default {
},
created() {
Events.$on('video.swap', this.refreshAnnotation);
this.$on('refresh', this.refreshAnnotations);
this.$on('refresh', this.refreshAllAnnotations);
this.$once('map-ready', () => {
this.$watch('annotationsRevision', () => {
this.refreshAnnotations(this.video.currentTime);
this.refreshAllAnnotations(this.video.currentTime);
});
});
},
Expand Down
2 changes: 1 addition & 1 deletion resources/assets/js/videos/videoContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,7 @@ export default {
.catch(handleErrorResponse);
},
refreshSingleAnnotation(annotation) {
this.$refs.videoScreen.refreshAnnotation(annotation);
this.$refs.videoScreen.refreshSingleAnnotation(annotation);
},
initAnnotationFilters() {
let reverseShapes = {};
Expand Down

0 comments on commit 2d32a75

Please sign in to comment.