honor user move event preference in tactics trainer
parent
c7c7705c3f
commit
828f1c26ba
|
@ -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] = {
|
||||
|
|
|
@ -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
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue