RED-6435: Removed add to dict character limit

This commit is contained in:
Adina Țeudan 2023-11-07 13:48:32 +02:00
parent 5fe11d1fdb
commit 0810cd4ae0

View File

@ -760,11 +760,11 @@ export class FilePreviewScreenComponent
.subscribe();
const selectedTextEffect = this._documentViewer.selectedText$.pipe(
tap(selectedText => {
tap(() => {
const canPerformActions = this.pdfProxyService.canPerformActions();
const isCurrentPageExcluded = this.state.file().isPageExcluded(this.pdf.currentPage());
if ((selectedText.length > 2 || this._isJapaneseString(selectedText)) && canPerformActions && !isCurrentPageExcluded) {
if (canPerformActions && !isCurrentPageExcluded) {
this.pdf.enable(textActions);
} else {
this.pdf.disable(textActions);
@ -852,10 +852,6 @@ export class FilePreviewScreenComponent
this._annotationManager.select(annotations);
}
private _isJapaneseString(text: string) {
return text.match(/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/);
}
#restoreOldFilters() {
combineLatest([
this._filterService.getGroup$('primaryFilters').pipe(first(filterGroup => !!filterGroup?.filters.length)),