Browse Source

Enable to handle allowOverlapping and graphemeMode option in sequence labeling page

pull/1511/head
Hironsan 3 years ago
parent
commit
070e8724bc
3 changed files with 16 additions and 2 deletions
  1. 10
      frontend/domain/models/project/project.ts
  2. 4
      frontend/pages/projects/_id/sequence-labeling/index.vue
  3. 4
      frontend/services/application/project/projectData.ts

10
frontend/domain/models/project/project.ts

@ -21,6 +21,8 @@ export class ProjectReadItem {
public collaborative_annotation: boolean, public collaborative_annotation: boolean,
public single_class_classification: boolean, public single_class_classification: boolean,
public resourcetype: string, public resourcetype: string,
public allow_overlapping: boolean,
public grapheme_mode: boolean,
public tags: Object[], public tags: Object[],
) {} ) {}
@ -38,6 +40,8 @@ export class ProjectReadItem {
collaborative_annotation, collaborative_annotation,
single_class_classification, single_class_classification,
resourcetype, resourcetype,
allow_overlapping,
grapheme_mode,
tags tags
}: }:
{ {
@ -53,6 +57,8 @@ export class ProjectReadItem {
collaborative_annotation: boolean, collaborative_annotation: boolean,
single_class_classification: boolean, single_class_classification: boolean,
resourcetype: string, resourcetype: string,
allow_overlapping: boolean,
grapheme_mode: boolean,
tags: Object[] tags: Object[]
} }
): ProjectReadItem { ): ProjectReadItem {
@ -69,6 +75,8 @@ export class ProjectReadItem {
collaborative_annotation, collaborative_annotation,
single_class_classification, single_class_classification,
resourcetype, resourcetype,
allow_overlapping,
grapheme_mode,
tags tags
) )
} }
@ -124,6 +132,8 @@ export class ProjectReadItem {
collaborative_annotation: this.collaborative_annotation, collaborative_annotation: this.collaborative_annotation,
single_class_classification: this.single_class_classification, single_class_classification: this.single_class_classification,
resourcetype: this.resourcetype, resourcetype: this.resourcetype,
allow_overlapping: this.allow_overlapping,
grapheme_mode: this.grapheme_mode,
tags: this.tags tags: this.tags
} }
} }

4
frontend/pages/projects/_id/sequence-labeling/index.vue

@ -27,7 +27,8 @@
:entity-labels="labels" :entity-labels="labels"
:relations="links" :relations="links"
:relation-labels="linkTypes" :relation-labels="linkTypes"
:allow-overlapping="allowOverlapping"
:allow-overlapping="project.allowOverlapping"
:grapheme-mode="project.graphemeMode"
@addEntity="addEntity" @addEntity="addEntity"
@click:entity="updateEntity" @click:entity="updateEntity"
@contextmenu:entity="deleteEntity" @contextmenu:entity="deleteEntity"
@ -78,7 +79,6 @@ export default {
data() { data() {
return { return {
annotations: [], annotations: [],
allowOverlapping: false,
docs: [], docs: [],
labels: [], labels: [],
links: [], links: [],

4
frontend/services/application/project/projectData.ts

@ -16,6 +16,8 @@ export class ProjectDTO {
canDefineLabel: Boolean canDefineLabel: Boolean
canDefineRelation: Boolean canDefineRelation: Boolean
isTextProject: Boolean isTextProject: Boolean
allowOverlapping: Boolean
graphemeMode: Boolean
constructor(item: ProjectReadItem) { constructor(item: ProjectReadItem) {
this.id = item.id this.id = item.id
@ -33,6 +35,8 @@ export class ProjectDTO {
this.canDefineLabel = item.canDefineLabel this.canDefineLabel = item.canDefineLabel
this.canDefineRelation = item.canDefineRelation this.canDefineRelation = item.canDefineRelation
this.isTextProject = item.isTextProject this.isTextProject = item.isTextProject
this.allowOverlapping = item.allow_overlapping
this.graphemeMode = item.grapheme_mode
} }
} }

Loading…
Cancel
Save