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

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

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

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

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

Loading…
Cancel
Save