honor user move event preference in tactics trainer

pull/2485/head
Thibault Duplessis 2016-12-24 13:09:38 +01:00
parent c7c7705c3f
commit 828f1c26ba
2 changed files with 8 additions and 0 deletions

View File

@ -61,6 +61,7 @@ final class JsonView(
"animation" -> Json.obj(
"duration" -> p.animationFactor * animationDuration.toMillis
),
"moveEvent" -> p.moveEvent,
"highlight" -> p.highlight)
private def makeBranch(puzzle: Puzzle): Option[tree.Branch] = {

View File

@ -13,6 +13,13 @@ module.exports = function(data, config, pref, onMove) {
dests: config.movable.dests,
rookCastle: pref.rookCastle
},
draggable: {
enabled: pref.moveEvent > 0,
showGhost: pref.highlight
},
selectable: {
enabled: pref.moveEvent !== 1
},
events: {
move: onMove
},