mirror of
https://github.com/kennethreitz/rhymepad.org.git
synced 2026-06-11 17:08:33 +00:00
No hover focus or inspector when rhyme is off
setEmphasis clears when the rhyme toggle is off, so hovering doesn't light a family or show the inspector with the rhyme layer disabled. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -848,6 +848,7 @@ editor.addEventListener('input', ()=>{ render(); analyzeSoon(); });
|
||||
editor.addEventListener('scroll', ()=>{ highlight.scrollTop = stresslayer.scrollTop = editor.scrollTop; highlight.scrollLeft = stresslayer.scrollLeft = editor.scrollLeft; renderGutter(); });
|
||||
const editorShell = document.querySelector('.editor-shell');
|
||||
function setEmphasis(g){
|
||||
if(!rhymeToggle.checked) g = null; // no rhyme layer, no focus
|
||||
if(g === activeFam) return;
|
||||
activeFam = g;
|
||||
editorShell.classList.toggle('focusing', g !== null);
|
||||
|
||||
Reference in New Issue
Block a user