always show recipes on vbox click

This commit is contained in:
ntr 2019-05-08 16:34:37 +10:00
parent d8c5effb2d
commit 9abbc26308
2 changed files with 11 additions and 1 deletions

View File

@ -8,6 +8,7 @@ const { convertVar } = require('./../utils');
function Vbox(args) {
const {
activeCryp,
setActiveCryp,
combiner,
info,
instance,
@ -72,6 +73,14 @@ function Vbox(args) {
return false;
};
function freeClick() {
if (c) {
setActiveCryp(null);
return setInfo('item', c);
}
return false;
}
return <td
key={j}
className={`${highlighted() ? 'highlight' : ''}`}
@ -79,7 +88,7 @@ function Vbox(args) {
onTouchEnd={e => vboxTouchEnd(e, i, j)}
onTouchMove={e => vboxTouchMove(e)}
onClick={() => { if (c) return setInfo('item', c); }}
onClick={freeClick}
onDblClick={() => sendVboxAccept(j, i) }
>
{convertVar(c)}

View File

@ -82,6 +82,7 @@ const addState = connect(
return {
setCombiner,
setActiveCryp,
setReclaiming,
setInfo,
setActiveCryp,