jhh6576 commited on
Commit
a43cb94
·
verified ·
1 Parent(s): 2767300

Update app_enhanced.py

Browse files
Files changed (1) hide show
  1. app_enhanced.py +3 -0
app_enhanced.py CHANGED
@@ -669,12 +669,14 @@ class EnhancedComicGenerator:
669
  });
670
  document.querySelectorAll('.speech-bubble').forEach(initializeBubbleEvents);
671
  document.getElementById('zoom-slider').addEventListener('input', handleZoom);
 
672
  document.getElementById('bubble-text-color').addEventListener('input', (e) => {
673
  if(currentlySelectedBubble) currentlySelectedBubble.style.color = e.target.value;
674
  });
675
  document.getElementById('bubble-fill-color').addEventListener('input', (e) => {
676
  if(currentlySelectedBubble) currentlySelectedBubble.style.backgroundColor = e.target.value;
677
  });
 
678
  document.addEventListener('mousemove', e => { if (isPanning) panImage(e); if (draggedBubble) drag(e); if(isResizing) resizeBubble(e); });
679
  document.addEventListener('mouseup', e => { if (isPanning) stopPan(e); if (draggedBubble) stopDrag(e); if(isResizing) stopResize(e);});
680
  document.addEventListener('mouseleave', e => { if (isPanning) stopPan(e); if (draggedBubble) stopDrag(e); if(isResizing) stopResize(e);});
@@ -801,6 +803,7 @@ class EnhancedComicGenerator:
801
  textSpan.textContent = textarea.value;
802
  bubble.removeChild(textarea);
803
  textSpan.style.display = '';
 
804
  currentlyEditing = null;
805
  };
806
  textarea.addEventListener('blur', finishEditing, { once: true });
 
669
  });
670
  document.querySelectorAll('.speech-bubble').forEach(initializeBubbleEvents);
671
  document.getElementById('zoom-slider').addEventListener('input', handleZoom);
672
+
673
  document.getElementById('bubble-text-color').addEventListener('input', (e) => {
674
  if(currentlySelectedBubble) currentlySelectedBubble.style.color = e.target.value;
675
  });
676
  document.getElementById('bubble-fill-color').addEventListener('input', (e) => {
677
  if(currentlySelectedBubble) currentlySelectedBubble.style.backgroundColor = e.target.value;
678
  });
679
+
680
  document.addEventListener('mousemove', e => { if (isPanning) panImage(e); if (draggedBubble) drag(e); if(isResizing) resizeBubble(e); });
681
  document.addEventListener('mouseup', e => { if (isPanning) stopPan(e); if (draggedBubble) stopDrag(e); if(isResizing) stopResize(e);});
682
  document.addEventListener('mouseleave', e => { if (isPanning) stopPan(e); if (draggedBubble) stopDrag(e); if(isResizing) stopResize(e);});
 
803
  textSpan.textContent = textarea.value;
804
  bubble.removeChild(textarea);
805
  textSpan.style.display = '';
806
+ // No need to set to auto, browser will handle it
807
  currentlyEditing = null;
808
  };
809
  textarea.addEventListener('blur', finishEditing, { once: true });