aboutsummaryrefslogtreecommitdiff
path: root/src/client/views/search
diff options
context:
space:
mode:
authorbobzel <zzzman@gmail.com>2024-08-26 22:25:58 -0400
committerbobzel <zzzman@gmail.com>2024-08-26 22:25:58 -0400
commitf0d9731e1c43ee13114d42db8c4e27c94bbbf3c0 (patch)
treeee5e462ad5e9499f62d51cabf0779ea84077f451 /src/client/views/search
parentb1e88ebc95cb7cdd18b8ba42bb267bcd9372154a (diff)
made face doc labels editable
Diffstat (limited to 'src/client/views/search')
-rw-r--r--src/client/views/search/FaceRecognitionHandler.tsx9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/client/views/search/FaceRecognitionHandler.tsx b/src/client/views/search/FaceRecognitionHandler.tsx
index 8513ec94d..dee0ab99b 100644
--- a/src/client/views/search/FaceRecognitionHandler.tsx
+++ b/src/client/views/search/FaceRecognitionHandler.tsx
@@ -24,7 +24,7 @@ import { DocumentManager } from '../../util/DocumentManager';
* 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#')
+ * face - a string label for the person that was recognized (TODO: currently it's just a 'face#')
* face_descriptors - a list of all the face descriptors for different images of the person
* face_docList - a list of all image Docs that contain a face for the person
*/
@@ -108,7 +108,9 @@ export class FaceRecognitionHandler {
* @param faceDoc unique face Doc
* @returns label string
*/
- public static UniqueFaceLabel = (faceDoc: Doc) => StrCast(faceDoc[DocData].face_label);
+ public static UniqueFaceLabel = (faceDoc: Doc) => StrCast(faceDoc[DocData].face);
+
+ public static SetUniqueFaceLabel = (faceDoc: Doc, value: string) => (faceDoc[DocData].face = value);
/**
* Returns all the face descriptors associated with a unique face Doc
* @param faceDoc unique face Doc
@@ -186,8 +188,7 @@ export class FaceRecognitionHandler {
_height: 100,
});
const uface = uniqueFaceDoc[DocData];
- uface.face = ''; // just to make prettyprinting look better
- uface.face_label = `Face${faceDocNum}`;
+ uface.face = `Face${faceDocNum}`;
uface.face_images = new List<Doc>();
uface.face_descriptors = new List<List<number>>();
Doc.SetContainer(uniqueFaceDoc, Doc.MyFaceCollection);