Commit 4537e905 authored by sai.sandeep's avatar sai.sandeep

text limit for tag

parent 6c84dcbf
......@@ -54,10 +54,14 @@ export class AnnotateTextComponent implements OnInit {
alert("The selected text is already annotated.");
return;
}
if (selection.endIndex - selection.startIndex <= 128) {
this.annotations = this.annotations.concat(
new Annotation(selection.startIndex, selection.endIndex, label, '#499bbc')
);
} else {
this._toast.toast('warning', 'Warning', 'Selected text is too big to be tagged.', true);
}
}
/**
* Method to put annotations into JSON format and emit to parent.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment