X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fsrc%2Fcomponents%2FBoard.vue;h=8a42d34eaff8738e53078c9d68396d212e3a7e36;hb=cd49e617866590dbc68530ad961b109cdbe1ce55;hp=e6a0aafdf08b1e8a8a1eea91bf6c298ad6d0935a;hpb=af34341d92d47d14f396e7f4adb81f2a7e9d9a61;p=vchess.git diff --git a/client/src/components/Board.vue b/client/src/components/Board.vue index e6a0aafd..8a42d34e 100644 --- a/client/src/components/Board.vue +++ b/client/src/components/Board.vue @@ -60,8 +60,10 @@ export default { if (!!lm) { if (!Array.isArray(lm)) lm = [lm]; lm.forEach(m => { - lmHighlights[m.start.x + sizeX * m.start.y] = true; - lmHighlights[m.end.x + sizeX * m.end.y] = true; + if (V.OnBoard(m.start.x, m.start.y)) + lmHighlights[m.start.x + sizeX * m.start.y] = true; + if (V.OnBoard(m.end.x, m.end.y)) + lmHighlights[m.end.x + sizeX * m.end.y] = true; }); } const showLight = ( @@ -212,7 +214,7 @@ export default { attrs: { src: "/images/pieces/" + - this.vr.getReservePpath(i, playingColor) + + this.vr.getReservePpath(i, playingColor, orientation) + ".svg" } }), @@ -239,7 +241,7 @@ export default { attrs: { src: "/images/pieces/" + - this.vr.getReservePpath(i, oppCol) + + this.vr.getReservePpath(i, oppCol, orientation) + ".svg" } }), @@ -709,6 +711,8 @@ export default {