remove opening box in puzzles

This commit is contained in:
Niklas Fiekas 2020-03-22 19:09:33 +01:00
parent f7ea8b51ba
commit eb6aca471f
4 changed files with 4 additions and 16 deletions

View file

@ -9,7 +9,6 @@
@import '../../../tree/css/tree'; @import '../../../tree/css/tree';
@import '../../../ceval/css/ceval'; @import '../../../ceval/css/ceval';
@import '../../../ceval/css/eval-gauge'; @import '../../../ceval/css/eval-gauge';
@import '../../../chess/css/opening';
@import '../../../chess/css/control'; @import '../../../chess/css/control';
@import '../../../chess/css/promotion'; @import '../../../chess/css/promotion';
@import '../../../chess/css/blindfold'; @import '../../../chess/css/blindfold';

View file

@ -240,8 +240,8 @@ export default function(opts, redraw: () => void): Controller {
}); });
}; };
function addDests(dests, path, opening) { function addDests(dests, path) {
tree.addDests(dests, path, opening); tree.addDests(dests, path);
if (path === vm.path) { if (path === vm.path) {
withGround(showGround); withGround(showGround);
// redraw(); // redraw();

View file

@ -16,7 +16,7 @@ export default function(opts) {
}, },
dests: function(data) { dests: function(data) {
anaDestsCache[data.path] = data; anaDestsCache[data.path] = data;
opts.addDests(data.dests, data.path, data.opening); opts.addDests(data.dests, data.path);
clearTimeout(anaDestsTimeout); clearTimeout(anaDestsTimeout);
}, },
destsFailure: function(data) { destsFailure: function(data) {

View file

@ -9,21 +9,10 @@ import historyView from './history';
import * as side from './side'; import * as side from './side';
import * as gridHacks from './gridHacks'; import * as gridHacks from './gridHacks';
import { onInsert, bind, bindMobileMousedown } from '../util'; import { onInsert, bind, bindMobileMousedown } from '../util';
import { Controller, MaybeVNode } from '../interfaces'; import { Controller } from '../interfaces';
function renderOpeningBox(ctrl: Controller): MaybeVNode {
var opening = ctrl.getTree().getOpening(ctrl.vm.nodeList);
if (opening) return h('div.opening_box', {
attrs: { title: opening.eco + ' ' + opening.name }
}, [
h('strong', opening.eco),
' ' + opening.name
]);
}
function renderAnalyse(ctrl: Controller): VNode { function renderAnalyse(ctrl: Controller): VNode {
return h('div.puzzle__moves.areplay', [ return h('div.puzzle__moves.areplay', [
renderOpeningBox(ctrl),
treeView(ctrl) treeView(ctrl)
]); ]);
} }