Web Dev Solutions

Catalin Mititiuc

aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCatalin Mititiuc <webdevcat@proton.me>2024-07-25 14:45:29 -0700
committerCatalin Mititiuc <webdevcat@proton.me>2024-07-25 14:45:29 -0700
commit00581b900f0f1d0dc6e972f80daa8438000115e3 (patch)
tree176a8386f0a66fe5647886fcb80558977e834571 /src/modules/game/soldier.js
parentf503f974f37f1a1916189a033a1708689d512d35 (diff)
Capture pan-zoom pointer sooner
Diffstat (limited to 'src/modules/game/soldier.js')
-rw-r--r--src/modules/game/soldier.js14
1 files changed, 7 insertions, 7 deletions
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) {