aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2024-10-11 21:30:46 +0800
committerHsieh Chin Fan <pham@topo.tw>2024-10-12 00:36:19 +0800
commit9fd0f76b892e01ca0e95b1532fcd400e74ea8b5b (patch)
tree1d59c379f403f88a0b4791f87aa40a8b0c8b0101 /src
parent2f4f688cbf8fb596405cbd7d2c89765d0d54106d (diff)
feat(neat): set blocks visible anyway in overlay layout
Diffstat (limited to 'src')
-rw-r--r--src/Layout.mjs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Layout.mjs b/src/Layout.mjs
index 83b92a7..1b5656d 100644
--- a/src/Layout.mjs
+++ b/src/Layout.mjs
@@ -175,6 +175,11 @@ export class Overlay extends Layout {
175 // FIXME It is weird rect from this method and this scope are different... 175 // FIXME It is weird rect from this method and this scope are different...
176 blocks.forEach(this.saveLeftTopAsData) 176 blocks.forEach(this.saveLeftTopAsData)
177 177
178 // If no block are focused, focus first three blocks (make them visible)
179 if (!blocks.find(b => b.classList.contains('focus'))) {
180 blocks.slice(0, 3).forEach(b => b.classList.add('focus'))
181 }
182
178 // Create draggable blocks and set each position by previous one 183 // Create draggable blocks and set each position by previous one
179 let [left, top] = [20, 20] 184 let [left, top] = [20, 20]
180 blocks.forEach(block => { 185 blocks.forEach(block => {