From 00581b900f0f1d0dc6e972f80daa8438000115e3 Mon Sep 17 00:00:00 2001
From: Catalin Mititiuc
Date: Thu, 25 Jul 2024 14:45:29 -0700
Subject: Capture pan-zoom pointer sooner
---
src/modules/game/soldier.js | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
(limited to 'src/modules/game/soldier.js')
diff --git a/src/modules/game/soldier.js b/src/modules/game/soldier.js
index 81dce74..8e5774b 100644
--- a/src/modules/game/soldier.js
+++ b/src/modules/game/soldier.js
@@ -124,14 +124,14 @@ export function place(svg, selected, cell) {
// piecesContainer.append(container);
//}
- if (svg.querySelector('.grid').contains(selected)) {
- const clone = addMoveToHistory(selected);
- updatePlacement(cell, selected, clone)
- handleTrace(svg, selected, clone, getCellPosition(cell));
- } else {
- selected.removeAttribute('data-x');
+ //if (svg.querySelector('.grid').contains(selected)) {
+ // const clone = addMoveToHistory(selected);
+ // updatePlacement(cell, selected, clone)
+ // handleTrace(svg, selected, clone, getCellPosition(cell));
+ //} else {
+ // selected.removeAttribute('data-x');
placeIn(cell, selected);
- }
+ //}
}
export function removeClones(svg, counter) {
--
cgit v1.2.3