remove opening box in puzzles

pull/6209/head
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 '../../../ceval/css/ceval';
@import '../../../ceval/css/eval-gauge';
@import '../../../chess/css/opening';
@import '../../../chess/css/control';
@import '../../../chess/css/promotion';
@import '../../../chess/css/blindfold';

View File

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

View File

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

View File

@ -9,21 +9,10 @@ import historyView from './history';
import * as side from './side';
import * as gridHacks from './gridHacks';
import { onInsert, bind, bindMobileMousedown } from '../util';
import { Controller, MaybeVNode } 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
]);
}
import { Controller } from '../interfaces';
function renderAnalyse(ctrl: Controller): VNode {
return h('div.puzzle__moves.areplay', [
renderOpeningBox(ctrl),
treeView(ctrl)
]);
}