diff options
Diffstat (limited to 'src/editor.mjs')
-rw-r--r-- | src/editor.mjs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/editor.mjs b/src/editor.mjs index 6d13816..897a0d1 100644 --- a/src/editor.mjs +++ b/src/editor.mjs | |||
@@ -10,10 +10,10 @@ const HtmlContainer = document.querySelector(".DumbyMap") | |||
10 | const textArea = document.querySelector(".editor textarea") | 10 | const textArea = document.querySelector(".editor textarea") |
11 | 11 | ||
12 | const toggleEditing = () => { | 12 | const toggleEditing = () => { |
13 | if (document.body.getAttribute("data-layout") === "editing") { | 13 | if (document.body.getAttribute("data-mode") === "editing") { |
14 | document.body.removeAttribute("data-layout") | 14 | document.body.removeAttribute("data-mode") |
15 | } else { | 15 | } else { |
16 | document.body.setAttribute("data-layout", "editing") | 16 | document.body.setAttribute("data-mode", "editing") |
17 | } | 17 | } |
18 | HtmlContainer.setAttribute("data-layout", "normal") | 18 | HtmlContainer.setAttribute("data-layout", "normal") |
19 | } | 19 | } |
@@ -560,7 +560,7 @@ document.onkeydown = (e) => { | |||
560 | const layoutObserver = new MutationObserver(() => { | 560 | const layoutObserver = new MutationObserver(() => { |
561 | const layout = HtmlContainer.getAttribute('data-layout') | 561 | const layout = HtmlContainer.getAttribute('data-layout') |
562 | if (layout !== 'normal') { | 562 | if (layout !== 'normal') { |
563 | document.body.removeAttribute('data-layout') | 563 | document.body.removeAttribute('data-mode') |
564 | } | 564 | } |
565 | }) | 565 | }) |
566 | 566 | ||