projects
/
vchess.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Lighter color for diagonal lines on board
[vchess.git]
/
client
/
src
/
components
/
Board.vue
diff --git
a/client/src/components/Board.vue
b/client/src/components/Board.vue
index
7f2e43e
..
88a3419
100644
(file)
--- a/
client/src/components/Board.vue
+++ b/
client/src/components/Board.vue
@@
-568,7
+568,11
@@
export default {
this.coordsToXY(line[1], bPos.top, bPos.left, squareWidth);
let path =
document.createElementNS("http://www.w3.org/2000/svg", "path");
this.coordsToXY(line[1], bPos.top, bPos.left, squareWidth);
let path =
document.createElementNS("http://www.w3.org/2000/svg", "path");
- path.classList.add("svg-line");
+ if (line[0][0] == line[1][0] || line[0][1] == line[1][1])
+ path.classList.add("svg-line");
+ else
+ // "Diagonals" are drawn with a lighter color (TODO: generalize)
+ path.classList.add("svg-diag");
path.setAttribute(
"d",
"M" + lStart.x + "," + lStart.y + " " +
path.setAttribute(
"d",
"M" + lStart.x + "," + lStart.y + " " +
@@
-844,6
+848,9
@@
export default {
.svg-line
stroke: black
.svg-line
stroke: black
+.svg-diag
+ stroke: grey
+
.arrow-head
fill: #5f0e78
</style>
.arrow-head
fill: #5f0e78
</style>