feat: Improve OCR process - replace Tesseract with PaddleOCR (#115) #122

Merged
egullickson merged 16 commits from issue-115-improve-ocr-paddleocr into main 2026-02-08 01:13:35 +00:00
Showing only changes of commit 0499c902a8 - Show all commits

View File

@@ -318,17 +318,15 @@ export function useImageCrop(options: UseImageCropOptions = {}): UseImageCropRet
if (isDrawingRef.current) {
isDrawingRef.current = false;
const area = cropAreaRef.current;
// When aspect ratio constrains one dimension, only check the free dimension
const meetsMinSize = aspectRatio
? area.width >= minSize
: area.width >= minSize && area.height >= minSize;
// Accept crop if at least one dimension is meaningful (allows thin strips like VINs)
const meetsMinSize = area.width >= minSize || area.height >= minSize;
if (meetsMinSize) {
setCropDrawn(true);
}
}
activeHandleRef.current = null;
setIsDragging(false);
}, [minSize, aspectRatio]);
}, [minSize]);
// Add global event listeners for drag
useEffect(() => {