aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/render-msg.js10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/render-msg.js b/lib/render-msg.js
index 39550ac..7d50ef8 100644
--- a/lib/render-msg.js
+++ b/lib/render-msg.js
@@ -1435,10 +1435,16 @@ RenderMsg.prototype.chessMoveFull = function (cb) {
var fen = c.fen && c.fen.length === 2 ? c.pgnMove : c.fen
var game = parseChess(fen)
var piece = game && lookupPiece(game.board, c.dest)
- self.link(self.c.root, function (err, rootLink) {
+ var done = multicb({pluck: 1, spread: true})
+ self.link(self.c.root, done())
+ self.links(self.c.branch, done())
+ done(function (err, rootLink, branchLinks) {
if (err) return cb(err)
self.wrap([
- h('div', h('small', '> ', rootLink)),
+ rootLink ? h('div', h('small', h('span.symbol', '→'), ' ', rootLink)) : '',
+ branchLinks.map(function (a, i) {
+ return h('div', h('small', h('span.symbol', '  ↳'), ' ', a))
+ }),
h('p',
// 'player ', (c.ply || ''), ' ',
'moved ', (piece ? [renderChessSymbol(piece), ' '] : ''),