Skip to content

Commit

Permalink
improve chessground drawing integration
Browse files Browse the repository at this point in the history
  • Loading branch information
ornicar committed Mar 23, 2015
1 parent b340a2b commit 5e941e5
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 10 deletions.
1 change: 1 addition & 0 deletions app/views/analyse/replay.scala.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<li><strong>j</strong>/<strong>k</strong> or <strong></strong>/<strong></strong> go to start/end</li>
<li><strong>c</strong> show/hide comments</li>
</ul>
Press shift+click to draw circles and arrows on the board!<br />
You can also scroll over the board to move in the game.
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions public/javascripts/vendor/chessground.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion public/stylesheets/board.css
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ body.base .cg-board .cg-square.exploding {
z-index: 2;
}
.cg-board-wrap svg * {
transition: 0.3s;
transition: 0.35s;
}
/* lichess */

Expand Down
2 changes: 1 addition & 1 deletion ui/analyse/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"watchify": "^1.0.2"
},
"dependencies": {
"chessground": "2.0.2",
"chessground": "2.0.3",
"chessli.js": "file:../chessli",
"game": "file:../game",
"lodash-node": "^2.4.1",
Expand Down
2 changes: 1 addition & 1 deletion ui/editor/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"watchify": "^1.0.2"
},
"dependencies": {
"chessground": "2.0.2",
"chessground": "2.0.3",
"lodash-node": "^2.4.1",
"mithril": "0.1.30"
}
Expand Down
2 changes: 1 addition & 1 deletion ui/lobby/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"watchify": "^1.0.2"
},
"dependencies": {
"chessground": "2.0.2",
"chessground": "2.0.3",
"lodash-node": "^2.4.1",
"mithril": "0.1.30"
}
Expand Down
2 changes: 1 addition & 1 deletion ui/opening/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"watchify": "^1.0.2"
},
"dependencies": {
"chessground": "2.0.2",
"chessground": "2.0.3",
"chessli.js": "file:../chessli",
"lodash-node": "^2.4.1",
"merge": "^1.2.0",
Expand Down
3 changes: 3 additions & 0 deletions ui/opening/src/ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,9 @@ module.exports = function(cfg, router, i18n) {
after: onMove
}
},
drawable: {
enabled: true
},
disableContextMenu: true
});

Expand Down
2 changes: 1 addition & 1 deletion ui/puzzle/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"watchify": "^1.0.2"
},
"dependencies": {
"chessground": "2.0.2",
"chessground": "2.0.3",
"chessli.js": "file:../chessli",
"lodash-node": "^2.4.1",
"merge": "^1.2.0",
Expand Down
3 changes: 3 additions & 0 deletions ui/puzzle/src/ctrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,9 @@ module.exports = function(cfg, router, i18n) {
premovable: {
enabled: true
},
drawable: {
enabled: true
},
disableContextMenu: true
}, this.data.chessground));

Expand Down
2 changes: 1 addition & 1 deletion ui/round/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"watchify": "^1.0.2"
},
"dependencies": {
"chessground": "2.0.2",
"chessground": "2.0.3",
"chessli.js": "file:../chessli",
"game": "file:../game",
"lodash-node": "^2.4.1",
Expand Down
3 changes: 3 additions & 0 deletions ui/round/src/ground.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ function makeConfig(data, fen, flip) {
draggable: {
showGhost: data.pref.highlight
},
drawable: {
enabled: true
},
disableContextMenu: true
};
}
Expand Down
2 changes: 1 addition & 1 deletion ui/tournament/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"dependencies": {
"game": "file:../game",
"chessground": "2.0.2",
"chessground": "2.0.3",
"lodash-node": "^2.4.1",
"mithril": "0.1.30"
}
Expand Down

0 comments on commit 5e941e5

Please sign in to comment.