diff options
Diffstat (limited to 'src/dumbyUtils.mjs')
-rw-r--r-- | src/dumbyUtils.mjs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/dumbyUtils.mjs b/src/dumbyUtils.mjs index fc9eab9..c878e48 100644 --- a/src/dumbyUtils.mjs +++ b/src/dumbyUtils.mjs | |||
@@ -1,12 +1,10 @@ | |||
1 | export function focusNextMap(reverse = false) { | 1 | export function focusNextMap(reverse = false) { |
2 | const renderedList = this.renderMaps | 2 | const renderedList = Array.from(this.htmlHolder.querySelectorAll('[data-render=fulfilled]')) |
3 | .map(render => render.target) | ||
4 | .filter(ele => ele.getAttribute('data-state') === 'rendered') | ||
5 | const mapNum = renderedList.length | 3 | const mapNum = renderedList.length |
6 | if (mapNum === 0) return | 4 | if (mapNum === 0) return |
7 | 5 | ||
8 | // Get current focused map element | 6 | // Get current focused map element |
9 | const currentFocus = this.container.querySelector('.map-container.focus') | 7 | const currentFocus = this.container.querySelector('.mapclay.focus') |
10 | 8 | ||
11 | // Remove class name of focus for ALL candidates | 9 | // Remove class name of focus for ALL candidates |
12 | // This may trigger animation | 10 | // This may trigger animation |