diff options
Diffstat (limited to 'src/dumbymap.mjs')
-rw-r--r-- | src/dumbymap.mjs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/dumbymap.mjs b/src/dumbymap.mjs index 393cc08..595de5c 100644 --- a/src/dumbymap.mjs +++ b/src/dumbymap.mjs | |||
@@ -191,6 +191,10 @@ function focusNextBlock(reverse = false) { | |||
191 | nextBlock.scrollIntoView({behavior: 'smooth', block: "nearest"}) | 191 | nextBlock.scrollIntoView({behavior: 'smooth', block: "nearest"}) |
192 | } | 192 | } |
193 | 193 | ||
194 | function removeBlockFocus() { | ||
195 | this.blocks.forEach(b=>b.classList.remove('focus')) | ||
196 | } | ||
197 | |||
194 | export const generateMaps = (container, callback) => { | 198 | export const generateMaps = (container, callback) => { |
195 | container.classList.add('Dumby') | 199 | container.classList.add('Dumby') |
196 | const htmlHolder = container.querySelector('.SemanticHtml') ?? container | 200 | const htmlHolder = container.querySelector('.SemanticHtml') ?? container |
@@ -211,6 +215,7 @@ export const generateMaps = (container, callback) => { | |||
211 | focusNextMap: throttle(focusNextMap.bind(dumbymap), focusDelay.bind(dumbymap)), | 215 | focusNextMap: throttle(focusNextMap.bind(dumbymap), focusDelay.bind(dumbymap)), |
212 | switchToNextLayout: throttle(switchToNextLayout.bind(dumbymap), 300), | 216 | switchToNextLayout: throttle(switchToNextLayout.bind(dumbymap), 300), |
213 | focusNextBlock: focusNextBlock.bind(dumbymap), | 217 | focusNextBlock: focusNextBlock.bind(dumbymap), |
218 | removeBlockFocus: removeBlockFocus.bind(dumbymap), | ||
214 | } | 219 | } |
215 | 220 | ||
216 | // LeaderLine {{{ | 221 | // LeaderLine {{{ |