fix: Drawing settings panel UI and interaction bugs (close button, text color palette, keyboard propagation)
This commit is contained in:
@ -1206,6 +1206,7 @@ export class DrawingManager {
|
||||
let startX, startY, initialX, initialY;
|
||||
|
||||
header.addEventListener('mousedown', (e) => {
|
||||
if (e.target.closest('button')) return; // Allow clicking the close button
|
||||
isDragging = true;
|
||||
startX = e.clientX;
|
||||
startY = e.clientY;
|
||||
@ -1329,6 +1330,10 @@ export class DrawingManager {
|
||||
this.applySettings('text', e.target.value);
|
||||
});
|
||||
|
||||
document.getElementById('tlTextInput').addEventListener('keydown', (e) => {
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
document.getElementById('tlAlignVert').addEventListener('change', (e) => {
|
||||
this.applySettings('alignVert', e.target.value);
|
||||
});
|
||||
@ -1400,7 +1405,6 @@ export class DrawingManager {
|
||||
if (isLineWithText) {
|
||||
if (textColorBtn && textPicker) {
|
||||
textColorBtn.style.backgroundColor = settings.textColor || settings.color;
|
||||
textPicker.classList.remove('hidden');
|
||||
}
|
||||
fontInput.value = settings.fontSize || 14;
|
||||
textInput.value = settings.text || '';
|
||||
|
||||
Reference in New Issue
Block a user