From bb05cdb1e88eea6813ef5a4a0a4fe22aa779ad5f Mon Sep 17 00:00:00 2001 From: mercu-lore <66737692+mercu-lore@users.noreply.github.com> Date: Wed, 12 Nov 2025 15:38:17 +0100 Subject: [PATCH] Add files via upload --- web/region_selector.html | 162 +++-- web/region_selector.js | 94 ++- web/region_selector_core.js | 1019 +++++++++++++++--------------- web/region_selector_extension.js | 572 +++++++++++++++-- web/region_selector_widget.js | 55 +- 5 files changed, 1235 insertions(+), 667 deletions(-) diff --git a/web/region_selector.html b/web/region_selector.html index 18a4e05..bac5399 100644 --- a/web/region_selector.html +++ b/web/region_selector.html @@ -91,15 +91,17 @@ body { display: flex; flex: 1; overflow: hidden; + min-height: 0; + min-width: 0; } /* Control Panel */ .control-panel { - width: 320px; + width: 250px; background-color: var(--panel-bg); border-right: 1px solid var(--border-color); overflow-y: auto; - padding: 20px; + padding: 15px; } .control-panel h3 { @@ -177,6 +179,31 @@ input[type="range"]::-moz-range-thumb { transition: all 0.2s ease; } +/* Selettore aspect ratio */ +.aspect-ratio-select { + width: 100%; + padding: 8px; + border: 1px solid var(--border-color); + border-radius: 6px; + font-size: 13px; + background-color: white; + cursor: pointer; + transition: all 0.2s ease; +} + +.aspect-ratio-select:focus { + outline: 2px solid var(--primary-color); + outline-offset: 2px; +} + +#aspect-ratio-hint { + display: block; + margin-top: 5px; + font-size: 11px; + color: var(--text-light); + font-style: italic; +} + /* Buttons */ .btn { padding: 8px 12px; @@ -228,6 +255,32 @@ input[type="range"]::-moz-range-thumb { background-color: #475569; } +.btn-warning { + background-color: var(--warning-color); + border-color: var(--warning-color); + color: white; + width: 100%; +} + +.btn-warning:hover:not(:disabled) { + background-color: #c2410c; + border-color: #c2410c; +} + +@keyframes pulse { + 0%, 100% { transform: scale(1); } + 50% { transform: scale(1.05); } +} + +.pulse-animation { + animation: pulse 2s ease-in-out infinite; +} + +.info-box-warning { + background-color: #fff7ed; + border-color: #fed7aa; +} + .btn-success { background-color: var(--success-color); color: white; @@ -305,12 +358,12 @@ input[type="range"]::-moz-range-thumb { .info-box { background-color: #f9fafb; border: 1px solid var(--border-color); - padding: 12px; + padding: 8px; border-radius: 6px; font-family: 'Monaco', 'Courier New', monospace; - font-size: 12px; + font-size: 11px; color: var(--text-color); - line-height: 1.5; + line-height: 1.4; overflow-x: auto; } @@ -331,8 +384,8 @@ input[type="range"]::-moz-range-thumb { } .action-buttons .btn { - padding: 10px; - font-size: 13px; + padding: 8px; + font-size: 12px; font-weight: 600; } @@ -356,25 +409,32 @@ hr { background-color: #fafbfc; overflow: hidden; position: relative; + padding: 20px; + min-height: 0; + min-width: 0; } #canvas-container { position: relative; - display: inline-flex; + display: flex; align-items: center; justify-content: center; background-color: white; - border-radius: 8px; - box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); overflow: hidden; - max-width: 90%; - max-height: 90%; + width: 100%; + height: 100%; + max-width: 100%; + max-height: 100%; } #background-image { display: block; + width: auto; + height: auto; max-width: 100%; max-height: 100%; + object-fit: contain; + object-position: center; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; @@ -470,7 +530,7 @@ hr { /* Responsive Design */ @media (max-width: 1024px) { .control-panel { - width: 280px; + width: 220px; } } @@ -523,64 +583,34 @@ textarea:focus {