desactivate laser pointer on tile (only avaliable for desktop firefox)
authorLaurent Mazet <mazet@softndesign.org>
Tue, 21 Jul 2020 20:24:05 +0000 (22:24 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Tue, 21 Jul 2020 20:24:05 +0000 (22:24 +0200)
public/trivabble.js

index 7bda1758781917b020cc5f42df4caaa1b6918837..73fcef952ac7a0849fd54384e704c162c8fcd997 100644 (file)
                 return;
             }
         }
+
+        if (e.type === "dblclick") {
+            const tilePlaceholder = boardCells[id].getElementsByClassName("tile-placeholder")[0];
+            if (tilePlaceholder.getElementsByClassName("tile")[0]) {
+                return;
+            }
+        }
+
         const letters = "ABCDEFGHIJKLMNO";
         const col = (id % 15) + 1;
         const row = letters[Math.floor(id / 15)];