From 9e03f9333641c818ed9c711282f27f7213cbe3c1 Mon Sep 17 00:00:00 2001 From: IEatChili Date: Fri, 2 Aug 2024 14:11:41 -0400 Subject: feat: integrated face recognition code with image documents --- src/client/util/DocumentManager.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/client/util') diff --git a/src/client/util/DocumentManager.ts b/src/client/util/DocumentManager.ts index 8ad6ddf47..7d4684f41 100644 --- a/src/client/util/DocumentManager.ts +++ b/src/client/util/DocumentManager.ts @@ -6,11 +6,12 @@ import { Id } from '../../fields/FieldSymbols'; import { listSpec } from '../../fields/Schema'; import { Cast, DocCast, NumCast, StrCast } from '../../fields/Types'; import { AudioField } from '../../fields/URLField'; -import { CollectionViewType } from '../documents/DocumentTypes'; +import { CollectionViewType, DocumentType } from '../documents/DocumentTypes'; import { DocumentView, DocumentViewInternal } from '../views/nodes/DocumentView'; import { FocusViewOptions } from '../views/nodes/FocusViewOptions'; import { OpenWhere } from '../views/nodes/OpenWhere'; import { PresBox } from '../views/nodes/trails'; +import { FaceRecognitionHandler } from '../views/search/FaceRecognitionHandler'; type childIterator = { viewSpec: Opt; childDocView: Opt; focused: boolean; contextPath: Doc[] }; export class DocumentManager { @@ -96,6 +97,9 @@ export class DocumentManager { @action public AddView = (view: DocumentView) => { + if (view.Document.type === DocumentType.IMG && view.Document.embedContainer) { + FaceRecognitionHandler.Instance.findMatches(view.Document); + } this.AddDocumentView(view); this.callAddViewFuncs(view); }; -- cgit v1.2.3-70-g09d2