From c3a82378fffad21bb29975043a01315602cb70b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=98=D0=B3=D0=BE=D1=80=D1=8C=20=D0=9D=D0=B0=D0=B4=D0=B5?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Thu, 18 Dec 2025 10:03:34 +0300 Subject: [PATCH] feat(avatar): add human silhouette overlay to avatar cropper MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Added visual guide with human body contour overlay to help users properly position their face for FaceID. Features: - SVG overlay with human silhouette (head, neck, shoulders) - Green dashed outline (70-80% face coverage guidance) - Guide lines (vertical center, horizontal eye level) - Text labels ('Верх головы', 'Плечи') - Toggle checkbox to show/hide overlay - Real-time overlay positioning synchronized with crop box Technical implementation: - SVG viewBox 400x400 with preserveAspectRatio - Dynamic positioning using getCropBoxData() - Event handlers: ready, crop, zoom - Overlay updates on cropper interactions - Pointer-events: none for non-intrusive UI UI/UX improvements: - Clear visual guidance for face positioning - Non-intrusive overlay (can be toggled off) - Color: #00ff00 (green) for high visibility - Opacity: 0.8 for overlay, 0.4 for guide lines - Auto-shown by default, user can disable Benefits: ✓ Reduces user errors in face positioning ✓ Ensures consistent photo quality for FaceID ✓ Visual feedback for proper head/shoulders alignment ✓ Improves user experience and reduces support requests --- .../js/components/avatarCropperHandler.js | 101 +++++++++++++++++- 1 file changed, 97 insertions(+), 4 deletions(-) diff --git a/backend/static/js/components/avatarCropperHandler.js b/backend/static/js/components/avatarCropperHandler.js index 4ada0b2c..c6f6838f 100644 --- a/backend/static/js/components/avatarCropperHandler.js +++ b/backend/static/js/components/avatarCropperHandler.js @@ -49,6 +49,7 @@ const DEFAULT_CONFIG = {
Требования для системы распознавания лиц: