aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Layout.mjs6
-rw-r--r--src/css/dumbymap.css4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/Layout.mjs b/src/Layout.mjs
index 0c992d7..2deef01 100644
--- a/src/Layout.mjs
+++ b/src/Layout.mjs
@@ -91,7 +91,7 @@ export class Overlay extends Layout {
91 91
92 // Close button 92 // Close button
93 draggableBlock.querySelector('#close').onclick = () => { 93 draggableBlock.querySelector('#close').onclick = () => {
94 draggableBlock.setAttribute("data-state", "hide") 94 draggableBlock.classList.add('hide')
95 } 95 }
96 // Plus/Minus font-size of content 96 // Plus/Minus font-size of content
97 draggableBlock.querySelector('#plus-font-size').onclick = () => { 97 draggableBlock.querySelector('#plus-font-size').onclick = () => {
@@ -107,11 +107,11 @@ export class Overlay extends Layout {
107 const utils = draggableBlock.querySelector('.utils') 107 const utils = draggableBlock.querySelector('.utils')
108 draggableInstance.onDragStart = () => { 108 draggableInstance.onDragStart = () => {
109 utils.style.opacity = 0 109 utils.style.opacity = 0
110 draggableBlock.setAttribute('data-state', 'on-drag') 110 draggableBlock.classList.add('drag')
111 } 111 }
112 draggableInstance.onDragEnd = () => { 112 draggableInstance.onDragEnd = () => {
113 utils.style = '' 113 utils.style = ''
114 draggableBlock.removeAttribute('data-state') 114 draggableBlock.classList.remove('drag')
115 } 115 }
116 116
117 // Reposition draggable instance when resized 117 // Reposition draggable instance when resized
diff --git a/src/css/dumbymap.css b/src/css/dumbymap.css
index fb3b76e..e04b6bc 100644
--- a/src/css/dumbymap.css
+++ b/src/css/dumbymap.css
@@ -330,7 +330,7 @@
330 display: none; 330 display: none;
331 } 331 }
332 332
333 &[data-state="hide"] { 333 &.hide {
334 animation: fade-out 0.3s; 334 animation: fade-out 0.3s;
335 335
336 opacity: 0; 336 opacity: 0;
@@ -338,7 +338,7 @@
338 } 338 }
339 339
340 &:has(.draggable:hover, .utils:hover), 340 &:has(.draggable:hover, .utils:hover),
341 &[data-state="on-drag"] { 341 &.drag {
342 .dumby-block { 342 .dumby-block {
343 color: gray; 343 color: gray;
344 344