diff options
Diffstat (limited to 'src/dumbyUtils.mjs')
-rw-r--r-- | src/dumbyUtils.mjs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dumbyUtils.mjs b/src/dumbyUtils.mjs index fde4dae..83d24c0 100644 --- a/src/dumbyUtils.mjs +++ b/src/dumbyUtils.mjs | |||
@@ -67,7 +67,7 @@ export function focusDelay () { | |||
67 | */ | 67 | */ |
68 | export function switchToNextLayout (reverse = false) { | 68 | export function switchToNextLayout (reverse = false) { |
69 | const layouts = this.layouts | 69 | const layouts = this.layouts |
70 | const currentLayoutName = this.container.getAttribute('data-layout') | 70 | const currentLayoutName = this.container.dataset.layout |
71 | const currentIndex = layouts.map(l => l.name).indexOf(currentLayoutName) | 71 | const currentIndex = layouts.map(l => l.name).indexOf(currentLayoutName) |
72 | const padding = reverse ? -1 : 1 | 72 | const padding = reverse ? -1 : 1 |
73 | const nextIndex = | 73 | const nextIndex = |
@@ -75,7 +75,7 @@ export function switchToNextLayout (reverse = false) { | |||
75 | ? 0 | 75 | ? 0 |
76 | : (currentIndex + padding + layouts.length) % layouts.length | 76 | : (currentIndex + padding + layouts.length) % layouts.length |
77 | const nextLayout = layouts[nextIndex] | 77 | const nextLayout = layouts[nextIndex] |
78 | this.container.setAttribute('data-layout', nextLayout.name) | 78 | this.container.dataset.layout = nextLayout.name |
79 | } | 79 | } |
80 | 80 | ||
81 | /** | 81 | /** |