Fix cancel firing arc placement bug
This commit is contained in:
parent
8970c1f59e
commit
0af0271076
@ -294,7 +294,7 @@ function set(svg, size, counter, { x, y }) {
|
||||
function cancelPlacementListener(e) {
|
||||
e.preventDefault();
|
||||
|
||||
get(counter).forEach(el => el.remove());
|
||||
get(svg, counter).forEach(el => el.remove());
|
||||
grid.removeAttribute('style');
|
||||
svg.removeEventListener('mousemove', positionListener);
|
||||
}
|
||||
|
@ -222,7 +222,7 @@ export function start(el) {
|
||||
const toPlace = placing.pop(),
|
||||
occupant = getCellOccupant(cell);
|
||||
|
||||
if (toPlace && occupant && toPlace == occupant) {
|
||||
if (toPlace && occupant && toPlace === occupant) {
|
||||
const { number, allegiance } = toPlace.dataset,
|
||||
selector = `[data-allegiance="${allegiance}"][data-number="${number}"]`;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user