diff -r 3a2a2a798bf4 -r a04c55054afe src_js/iconolab-bundle/src/components/editor/AnnotationForm.vue --- a/src_js/iconolab-bundle/src/components/editor/AnnotationForm.vue Thu Mar 09 12:39:36 2017 +0100 +++ b/src_js/iconolab-bundle/src/components/editor/AnnotationForm.vue Mon Mar 13 18:48:35 2017 +0100 @@ -76,17 +76,15 @@ data() { return defaults; }, + mounted() { + if (this.annotation) { + this.loadAnnotation(this.annotation); + } + }, watch: { annotation: function(annotation) { if (annotation) { - // Make sure we have an actual copy - Object.assign(this, { - title: annotation.title, - description: annotation.description, - fragment: annotation.fragment, - tags: annotation.tags.slice(), - readonly: true, - }); + this.loadAnnotation(annotation); } else { this.reset(); } @@ -128,6 +126,16 @@ reset: function() { Object.assign(this, defaults); }, + loadAnnotation(annotation) { + // Make sure we have an actual copy + Object.assign(this, { + title: annotation.title, + description: annotation.description, + fragment: annotation.fragment, + tags: annotation.tags.slice(), + readonly: true, + }); + } } }