Skip to content

Commit

Permalink
Color code move annotations in game graph
Browse files Browse the repository at this point in the history
  • Loading branch information
yishn committed Nov 10, 2018
1 parent a98217b commit 8b6b309
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
**Added**

* When adding analysis variation to the game tree, SGF move annotation will be supplied automatically
* Color coded game tree nodes according to their move annotation

**Changed**

Expand Down
7 changes: 5 additions & 2 deletions src/components/GameGraph.js
Expand Up @@ -335,8 +335,11 @@ class GameGraph extends Component {

let isCurrentNode = helper.vertexEquals(this.props.treePosition, [tree, index])
let opacity = onCurrentTrack ? 1 : .5
let fillRGB =
commentProperties.some(x => x in node) ? [107, 177, 255]
let fillRGB = 'BM' in node ? [240, 35, 17]
: 'DO' in node ? [146, 39, 143]
: 'IT' in node ? [72, 134, 213]
: 'TE' in node ? [89, 168, 15]
: commentProperties.some(x => x in node) ? [255, 174, 61]
: [238, 238, 238]

let left = x * gridSize
Expand Down

0 comments on commit 8b6b309

Please sign in to comment.