From 41c24746616bc9707de321fa78e803e6ce4bcfe0 Mon Sep 17 00:00:00 2001
From: ksthicke <85892703+ksthicke@users.noreply.github.com>
Date: Sun, 12 May 2024 18:45:46 -0500
Subject: [PATCH 1/2] fix crazyhouse drag issue
---
src/renderer/components/ChessPocket.vue | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/renderer/components/ChessPocket.vue b/src/renderer/components/ChessPocket.vue
index add2d07f..180a0018 100644
--- a/src/renderer/components/ChessPocket.vue
+++ b/src/renderer/components/ChessPocket.vue
@@ -14,6 +14,7 @@
class="piece"
:class="[piece.type, color, piece.type === selectedPiece ? 'selected' : '' , orientation === 'white' && color === 'black' ? 'flipB' : '', orientation === 'black' ? 'flipW' : '']"
@mousedown="clicked($event, piece.type, color, piece.count)"
+ @dragstart="(e) => e.preventDefault()"
/>
Date: Sun, 12 May 2024 18:58:59 -0500
Subject: [PATCH 2/2] remove log messages
---
src/renderer/components/ChessGround.vue | 3 ---
src/renderer/components/ChessPocket.vue | 2 --
2 files changed, 5 deletions(-)
diff --git a/src/renderer/components/ChessGround.vue b/src/renderer/components/ChessGround.vue
index ae1c4c87..c3f2f71d 100644
--- a/src/renderer/components/ChessGround.vue
+++ b/src/renderer/components/ChessGround.vue
@@ -646,8 +646,6 @@ export default {
dropPiece (event, pieceType, color) {
this.board.dragNewPiece({ role: pieceType, color: color, promoted: false }, event)
this.selectedPiece = pieceType
- console.log(`dropPiece: ${event} ${pieceType} ${color}`)
- console.log(`dropPiece: ${this.board.getFen()}`)
},
extractMoves (move) {
const letters = move.split(/(\d+)/)
@@ -828,7 +826,6 @@ export default {
this.$store.dispatch('push', { move: uciMove, prev: prevMov })
this.updateHand()
this.afterMove()
- console.log(this.turn)
}
}
},
diff --git a/src/renderer/components/ChessPocket.vue b/src/renderer/components/ChessPocket.vue
index 180a0018..be06b5d2 100644
--- a/src/renderer/components/ChessPocket.vue
+++ b/src/renderer/components/ChessPocket.vue
@@ -66,8 +66,6 @@ export default {
if (pieceCount === 0) {
return
}
- console.log(`pieceType: ${pieceType}`)
- console.log(`color: ${color}`)
this.$emit('selection', event, pieceType, color)
}
}