diff options
author | bobzel <zzzman@gmail.com> | 2024-04-24 14:56:48 -0400 |
---|---|---|
committer | bobzel <zzzman@gmail.com> | 2024-04-24 14:56:48 -0400 |
commit | aa4f7b37483c516b92181d3374d3151972b98383 (patch) | |
tree | 042520fc1fad30c00e27c532a872b4129f29264d /src/ClientUtils.ts | |
parent | 9d69ab27de83ead3e499edc9028ba85749407a1e (diff) |
fixed search on pdfs to display results when pDF is not selected. fixed presentation transitions to animate. changed so that annotaitons on pdfs would highlight when following a pres slide. fixed scrolling to annotations (and other viewSpecs) from presentations by using the slide target, not the slide as the focus document. cleaned up search and fixed to unhighlight searches on close. fixe pdf search unhighligting to work.
Diffstat (limited to 'src/ClientUtils.ts')
-rw-r--r-- | src/ClientUtils.ts | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/ClientUtils.ts b/src/ClientUtils.ts index 57e0373c4..402f6613a 100644 --- a/src/ClientUtils.ts +++ b/src/ClientUtils.ts @@ -3,7 +3,7 @@ import * as React from 'react'; import { ColorResult } from 'react-color'; import * as rp from 'request-promise'; import { numberRange, decimalToHexString } from './Utils'; -import { DocumentType } from './client/documents/DocumentTypes'; +import { CollectionViewType, DocumentType } from './client/documents/DocumentTypes'; import { Colors } from './client/views/global/globalEnums'; export function DashColor(color: string) { @@ -100,11 +100,22 @@ export namespace ClientUtils { return Date.now() - downTime < ClientUtils.CLICK_TIME && Math.abs(x - downX) < ClientUtils.DRAG_THRESHOLD && Math.abs(y - downY) < ClientUtils.DRAG_THRESHOLD; } - export function cleanDocumentType(type: DocumentType) { + export function cleanDocumentTypeExt(type: DocumentType) { switch (type) { + case DocumentType.PDF: return 'PDF'; + case DocumentType.IMG: return 'Img'; + case DocumentType.AUDIO: return 'Aud'; + case DocumentType.COL: return 'Col'; + case DocumentType.RTF: return 'Rtf'; + default: return type.charAt(0).toUpperCase() + type.substring(1,3); + } // prettier-ignore + } + export function cleanDocumentType(type: DocumentType, colType: CollectionViewType) { + switch (type) { + case DocumentType.PDF: return 'PDF'; case DocumentType.IMG: return 'Image'; case DocumentType.AUDIO: return 'Audio'; - case DocumentType.COL: return 'Collection'; + case DocumentType.COL: return 'Collection:'+colType; case DocumentType.RTF: return 'Text'; default: return type.charAt(0).toUpperCase() + type.slice(1); } // prettier-ignore |