Refactor CanvasView: externalize styles and tooltips

Moved inline CSS from CanvasView.js to a dedicated canvas_view.css file and added dynamic stylesheet loading. Extracted tooltip and shortcut HTML into separate template files and implemented a ResourceManager utility for loading stylesheets and templates. Updated CanvasInteractions.js and CanvasView.js to use the new resource management and template loading approach, improving maintainability and modularity.
This commit is contained in:
Dariusz L
2025-07-03 17:27:00 +02:00
parent bd8007d8aa
commit 3e4cdf10bc
8 changed files with 517 additions and 500 deletions

View File

@@ -0,0 +1,9 @@
<h4>Mask Mode</h4>
<table>
<tr><td><kbd>Click + Drag</kbd></td><td>Paint on the mask</td></tr>
<tr><td><kbd>Middle Mouse Button + Drag</kbd></td><td>Pan canvas view</td></tr>
<tr><td><kbd>Mouse Wheel</kbd></td><td>Zoom view in/out</td></tr>
<tr><td><strong>Brush Controls</strong></td><td>Use sliders to control brush <strong>Size</strong>, <strong>Strength</strong>, and <strong>Hardness</strong></td></tr>
<tr><td><strong>Clear Mask</strong></td><td>Remove the entire mask</td></tr>
<tr><td><strong>Exit Mode</strong></td><td>Click the "Draw Mask" button again</td></tr>
</table>