From 20c0a47c009e1f024239b118f608a34e96d04e5f Mon Sep 17 00:00:00 2001 From: "Adriano (daitarn)" Date: Wed, 28 Oct 2026 21:59:01 +0100 Subject: [PATCH] : visualizzatore immagine standard, tmfSaveBlob e tmfSvgToPngBlob Refs #122 Co-Authored-By: Claude Sonnet 5.5 --- .../flask_app/static/js/image_viewer.js | 433 ++++++++++++++++++ .../flask_app/static/js/save_image.js | 129 ++++-- .../flask_app/tests/js/test_image_viewer.js | 98 ++++ .../flask_app/tests/js/test_save_image.js | 83 +++- .../flask_app/tests/test_image_viewer_js.py | 35 ++ 5 files changed, 748 insertions(+), 30 deletions(-) create mode 100644 src/frontend/flask_app/static/js/image_viewer.js create mode 100644 src/frontend/flask_app/tests/js/test_image_viewer.js create mode 100644 src/frontend/flask_app/tests/test_image_viewer_js.py diff --git a/src/frontend/flask_app/static/js/image_viewer.js b/src/frontend/flask_app/static/js/image_viewer.js new file mode 100644 index 0000000..d43c5ed --- /dev/null +++ b/src/frontend/flask_app/static/js/image_viewer.js @@ -0,0 +1,433 @@ +/** + * image_viewer.js - #122: , il visualizzatore immagine standard di TieMeasureFlow. + * + * Cosa fa: Custom Element in JS puro (senza Alpine ne' Tailwind) con zoom -/+, Adatta, Salva, percentuale, + * Ctrl+rotella intorno al puntatore, pan col puntatore, overlay SVG a tratto costante ed etichette. + * Sostituisce le quattro implementazioni di zoom di prima (pannello operatore #115, wizard DXF #113 e #104, + * pagina camera #111). Light DOM, stile iniettato una volta nel (