aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-10-01 12:28:19 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-10-01 12:32:04 +0800
commite35f8d9b4fdc2315b03c813b451261f20d83cc09 (patch)
tree7758d8bc1bee00a061dc3a3972008f942abfc994 /src
parent5072cf2805e7815524c9320ddd7970dd9625f024 (diff)
feat: add menu-items for toggling focus
Diffstat (limited to 'src')
-rw-r--r--src/MenuItem.mjs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/MenuItem.mjs b/src/MenuItem.mjs
index 1ab7d5f..56b935c 100644
--- a/src/MenuItem.mjs
+++ b/src/MenuItem.mjs
@@ -189,3 +189,15 @@ function printObject(obj, parentElement, name) {
189 }); 189 });
190 }; 190 };
191} 191}
192
193export const toggleBlockFocus = block =>
194 new Item({
195 text: 'Toggle Focus',
196 onclick: () => block.classList.toggle('focus'),
197 });
198
199export const toggleMapFocus = map =>
200 new Item({
201 text: 'Toggle Focus',
202 onclick: () => map.classList.toggle('focus'),
203 });