mirror of
https://github.com/jam422470459/EPD-nRF52-hema213.git
synced 2025-12-06 16:42:49 +08:00
hide brush tools
This commit is contained in:
@@ -128,7 +128,7 @@
|
||||
<button id="eraser-mode" title="橡皮擦" class="tool-button">🧽</button>
|
||||
<button id="text-mode" title="添加文字" class="tool-button">T</button>
|
||||
</div>
|
||||
<div class="flex-group">
|
||||
<div class="flex-group brush-tools">
|
||||
<label for="brush-color">画笔:</label>
|
||||
<select id="brush-color">
|
||||
<option value="#000000">黑色</option>
|
||||
|
||||
@@ -94,6 +94,11 @@ function updateToolUI() {
|
||||
document.getElementById('eraser-mode').classList.toggle('active', currentTool === 'eraser');
|
||||
document.getElementById('text-mode').classList.toggle('active', currentTool === 'text');
|
||||
|
||||
// Show/hide brush tools
|
||||
document.querySelectorAll('.brush-tools').forEach(el => {
|
||||
el.style.display = ['brush', 'text'].includes(currentTool) ? 'flex' : 'none';
|
||||
});
|
||||
|
||||
// Show/hide text tools
|
||||
document.querySelectorAll('.text-tools').forEach(el => {
|
||||
el.style.display = currentTool === 'text' ? 'flex' : 'none';
|
||||
|
||||
Reference in New Issue
Block a user