From 38edde57bc7bcf45ad314e66d98152282b9fd57c Mon Sep 17 00:00:00 2001 From: bobzel Date: Wed, 14 Jun 2023 12:40:42 -0400 Subject: fixed icons on tree views and presentation --- src/fields/Doc.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/fields/Doc.ts') diff --git a/src/fields/Doc.ts b/src/fields/Doc.ts index 92ae64567..c674a20d2 100644 --- a/src/fields/Doc.ts +++ b/src/fields/Doc.ts @@ -1534,13 +1534,13 @@ export namespace Doc { // prettier-ignore export function toIcon(doc?: Doc, isOpen?: boolean) { - switch (StrCast(doc?.type)) { + switch (isOpen !== undefined ? DocumentType.COL: StrCast(doc?.type)) { case DocumentType.IMG: return 'image'; case DocumentType.COMPARISON: return 'columns'; case DocumentType.RTF: return 'sticky-note'; case DocumentType.COL: - const folder: IconProp = isOpen ? 'folder-open' : 'folder'; - const chevron: IconProp = isOpen ? 'chevron-down' : 'chevron-right'; + const folder: IconProp = isOpen === true ? 'folder-open' : isOpen === false ? 'folder' : 'question'; + const chevron: IconProp = isOpen === true ? 'chevron-down' : isOpen === false ? 'chevron-right' : 'question'; return !doc?.isFolder ? folder : chevron; case DocumentType.WEB: return 'globe-asia'; case DocumentType.SCREENSHOT: return 'photo-video'; -- cgit v1.2.3-70-g09d2