From c224ea482e4a89cfa4573a7d0748616e81e1924b Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Sun, 15 Sep 2024 11:01:19 +0800 Subject: chore: eslint --- src/css/dumbymap.css | 1 - src/dumbymap.mjs | 2 +- src/editor.mjs | 5 +---- 3 files changed, 2 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/css/dumbymap.css b/src/css/dumbymap.css index ab09863..2da2376 100644 --- a/src/css/dumbymap.css +++ b/src/css/dumbymap.css @@ -144,7 +144,6 @@ box-sizing: content-box; position: absolute; width: fit-content; - height: fill-available; max-height: 50vh; overflow: scroll; border: solid gray; diff --git a/src/dumbymap.mjs b/src/dumbymap.mjs index 4d4628d..ba0ef0c 100644 --- a/src/dumbymap.mjs +++ b/src/dumbymap.mjs @@ -391,7 +391,7 @@ export const generateMaps = async (container) => { block.style.transform = 'none' try { block.draggableInstance?.remove() - } catch (err) { } + } catch (_) { } }) } }); diff --git a/src/editor.mjs b/src/editor.mjs index 67f0d6a..14daab4 100644 --- a/src/editor.mjs +++ b/src/editor.mjs @@ -34,7 +34,6 @@ const getContentFromHash = (hash) => { } const initialState = getStateFromHash(window.location.hash) -const queryParams = new URL(window.location).searchParams window.location.hash = '' const contentFromHash = initialState.content const lastContent = localStorage.getItem('editorContent') @@ -143,11 +142,9 @@ const debounceForMap = (() => { let timer = null; return function(...args) { - let context = this; - clearTimeout(timer); timer = setTimeout(() => { - generateMaps.apply(context, args) + generateMaps.apply(this, args) }, 1000); } })() -- cgit v1.2.3-70-g09d2