From cc3e1bc2c317cf34aba04e4935ae842b16ad4cae Mon Sep 17 00:00:00 2001 From: bobzel Date: Mon, 26 Aug 2024 11:22:38 -0400 Subject: cleanup of setting myXXstuff on dashboards --- src/client/views/search/FaceRecognitionHandler.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/client/views/search') diff --git a/src/client/views/search/FaceRecognitionHandler.tsx b/src/client/views/search/FaceRecognitionHandler.tsx index f5fc12a8d..a17e4c54a 100644 --- a/src/client/views/search/FaceRecognitionHandler.tsx +++ b/src/client/views/search/FaceRecognitionHandler.tsx @@ -20,7 +20,7 @@ import { ImageField } from '../../../fields/URLField'; * _faceDescriptors - list of all the numerical face representations found in the image. * _faces - list of unique face Docs corresponding to recognized faces in the image. * - * unique face Doc's are created for each person identified and are stored in the Dashboard's uniqueFaces field + * unique face Doc's are created for each person identified and are stored in the Dashboard's myUniqueFaces field * * Each unique face Doc represents a unique face and collects all matching face images for that person. It has these fields: * face_label - a string label for the person that was recognized (TODO: currently it's just a 'face#') @@ -93,14 +93,14 @@ export class FaceRecognitionHandler { * returns a list of all face collection Docs on the current dashboard * @returns face collection Doc list */ - public static UniqueFaces = () => DocListCast(Doc.ActiveDashboard?.[DocData].uniqueFaces); + public static UniqueFaces = () => DocListCast(Doc.ActiveDashboard?.[DocData].myUniqueFaces); /** * Removes a unique face from the set of recognized unique faces * @param faceDoc unique face Doc * @returns */ - public static DeleteUniqueFace = (faceDoc: Doc) => Doc.ActiveDashboard && Doc.RemoveDocFromList(Doc.ActiveDashboard[DocData], 'uniqueFaces', faceDoc); + public static DeleteUniqueFace = (faceDoc: Doc) => Doc.ActiveDashboard && Doc.RemoveDocFromList(Doc.ActiveDashboard[DocData], 'myUniqueFaces', faceDoc); /** * returns the labels associated with a face collection Doc @@ -169,8 +169,8 @@ export class FaceRecognitionHandler { * @returns a unique face Doc */ private createUniqueFaceDoc = (dashboard: Doc) => { - const faceDocNum = NumCast(dashboard.uniqueFaces_count) + 1; - dashboard.uniqueFaces_count = faceDocNum; // TODO: improve to a better name + const faceDocNum = NumCast(dashboard.myUniqueFaces_count) + 1; + dashboard.myUniqueFaces_count = faceDocNum; // TODO: improve to a better name const uniqueFaceDoc = new Doc(); uniqueFaceDoc.title = `Face ${faceDocNum}`; @@ -179,7 +179,7 @@ export class FaceRecognitionHandler { uniqueFaceDoc.face_images = new List(); uniqueFaceDoc.face_descriptors = new List>(); - Doc.ActiveDashboard && Doc.AddDocToList(Doc.ActiveDashboard[DocData], 'uniqueFaces', uniqueFaceDoc); + Doc.ActiveDashboard && Doc.AddDocToList(Doc.ActiveDashboard[DocData], 'myUniqueFaces', uniqueFaceDoc); return uniqueFaceDoc; }; -- cgit v1.2.3-70-g09d2