From 18f8dbf36c2b7ac5087dcb32f3966e09e4d1e18c Mon Sep 17 00:00:00 2001 From: telion2 Date: Thu, 15 Mar 2018 13:12:03 +0100 Subject: [PATCH] update, bugfixes for #78 --- views/analysis.vue | 16 ++--- views/components/analysis/analighter.vue | 21 ++++--- views/components/analysis/correction.vue | 17 +++--- views/components/analysis/research.vue | 1 + views/components/analysis/researchresult.vue | 3 +- .../analysis/textfeatureviewport.vue | 61 ++++++++++++------- 6 files changed, 67 insertions(+), 52 deletions(-) diff --git a/views/analysis.vue b/views/analysis.vue index 41a1313b..072c8e37 100644 --- a/views/analysis.vue +++ b/views/analysis.vue @@ -70,7 +70,6 @@ v-bind:notemodes="notemodes" v-bind:researchmode="researchmode" v-bind:selectedchain="selectedChain" - v-bind:showmode="showMode" v-bind:contentcontrol="contentcontrol" v-bind:hoverdata="hoverdata" v-bind:wordtomarkonhoverdata="wordtomarkonhoverdata" @@ -82,7 +81,7 @@ v-on:togglesemanticlass="changeMarkerMode($event)" v-on:starthover="starthover($event)" v-on:endhover="endhover($event)" - v-on:entercorrectionmode="entercorrectionmode($event)"> + v-on:updateclassestomark="updateclassestomark($event)"> @@ -124,7 +123,6 @@ offsetend: null, semanticclass: {}, analysisMode: 'analighter', - showMode: 'entitiesview', researchmode: '', classesToMark: { coref: false, @@ -189,6 +187,9 @@ } }, methods: { + updateclassestomark:function (newClassesToMark) { + this.classesToMark = newClassesToMark; + }, toogleResearchContent: function (toToggle) { this.contentcontrol.PERSONS[toToggle] = !this.contentcontrol.PERSONS[toToggle]; this.contentcontrol.LOCATIONS[toToggle] = !this.contentcontrol.LOCATIONS[toToggle]; @@ -221,15 +222,6 @@ changeMarkerMode: function (newClassesToMark) { this.classesToMark = newClassesToMark; }, - entercorrectionmode: function (correctionMode) { - if (correctionMode === true) { - this.classesToMark.POS = correctionMode; - this.showMode = 'correction'; - } else { - this.classesToMark.POS = correctionMode; - this.showMode = 'entitiesview'; - } - }, selectText: function (index, modus) { if (modus === 0) { this.selectedtextindexes.start = index; diff --git a/views/components/analysis/analighter.vue b/views/components/analysis/analighter.vue index 9727feb2..662baf06 100644 --- a/views/components/analysis/analighter.vue +++ b/views/components/analysis/analighter.vue @@ -16,7 +16,8 @@ v-on:togglesemanticlass="togglesemanticlass($event)" v-on:endhover="endhover($event)" v-on:starthover="starthover($event)" - v-on:editresearch="editresearch($event)"> + v-on:editresearch="editresearch($event)" + v-on:selectresearch="selectedresearch($event)"> @@ -31,7 +32,6 @@ props: { serverip: {type: String, default: ""}, - showmode: {type: String, default: ""}, selectedindexes: {type: Object, default: null}, contentcontrol: {type: Object, default: null}, hoverdata: {type: Object, default: null}, @@ -57,7 +57,8 @@ }, data: function () { return { - researchdatatoedit: {} + researchdatatoedit: {}, + showmode: 'entitiesview' } }, methods: { @@ -70,14 +71,16 @@ starthover: function (textIndex) { this.$emit('starthover', textIndex); }, - editresearch: function (researchData){ - //emit for a button on toolbar. To Delete if button on toolbar not needed. - this.$emit('entercorrectionmode', true); - this.researchdatatoedit = researchData; + editresearch: function (researchData) { + this.classestomark.POS = true; + this.showmode = 'correction'; + this.$emit('updateclassestomark', this.classestomark); }, - selectedresearch:function (researchData) { - this.$emit('entercorrectionmode', false); + selectedresearch: function (researchData) { + this.classestomark.POS = false; + this.showmode = 'entitiesview'; this.researchdatatoedit = researchData; + this.$emit('updateclassestomark', this.classestomark); } }, components: { diff --git a/views/components/analysis/correction.vue b/views/components/analysis/correction.vue index 2946ea13..1c1d2ba0 100644 --- a/views/components/analysis/correction.vue +++ b/views/components/analysis/correction.vue @@ -47,7 +47,8 @@ v-bind:contentcontrol="contentcontrol" v-bind:selectedindexes="selectedindexes" v-bind:wordtomarkonhoverdata="wordtomarkonhoverdata" - v-bind:selectedchain="selectedchain"> + v-bind:selectedchain="selectedchain" + v-on:saveresult="saveresult($event)"> @@ -56,6 +57,7 @@