From a3a5ab51aa4ee8f6c771e3dd1f9a51b579b06e3d Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Tue, 24 Sep 2024 15:28:35 +0800 Subject: chore: reformat code --- src/dumbymap.mjs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/dumbymap.mjs b/src/dumbymap.mjs index 1e8c38d..59c656c 100644 --- a/src/dumbymap.mjs +++ b/src/dumbymap.mjs @@ -179,23 +179,23 @@ function switchToNextLayout(reverse = false) { } function focusNextBlock(reverse = false) { - const blocks = this.blocks.filter(b=>b.checkVisibility({ + const blocks = this.blocks.filter(b => b.checkVisibility({ contentVisibilityAuto: true, opacityProperty: true, visibilityProperty: true, })) - const currentBlock = blocks.find(b=>b.classList.contains('focus')) + const currentBlock = blocks.find(b => b.classList.contains('focus')) const currentIndex = blocks.indexOf(currentBlock) const padding = reverse ? -1 : 1 const nextIndex = currentIndex === -1 ? 0 : (currentIndex + padding + blocks.length) % blocks.length const nextBlock = blocks[nextIndex] - blocks.forEach(b=>b.classList.remove('focus')) + blocks.forEach(b => b.classList.remove('focus')) nextBlock?.classList?.add('focus') - nextBlock.scrollIntoView({behavior: 'smooth', block: "nearest"}) + nextBlock.scrollIntoView({ behavior: 'smooth', block: "nearest" }) } function removeBlockFocus() { - this.blocks.forEach(b=>b.classList.remove('focus')) + this.blocks.forEach(b => b.classList.remove('focus')) } export const generateMaps = (container, callback) => { -- cgit v1.2.3-70-g09d2