remove opening box in puzzles
This commit is contained in:
parent
f7ea8b51ba
commit
eb6aca471f
|
@ -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';
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue