vbox fix
This commit is contained in:
parent
27473ffdd5
commit
4c74671320
@ -32,13 +32,11 @@ function Vbox(args) {
|
|||||||
return sendVboxReclaim(i);
|
return sendVboxReclaim(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (combiner.indexOf(i) === -1) {
|
|
||||||
const insert = combiner.findIndex(j => j === null);
|
const insert = combiner.findIndex(j => j === null);
|
||||||
|
if (insert === -1) return setCombiner([i, null, null]);
|
||||||
combiner[insert] = i;
|
combiner[insert] = i;
|
||||||
return setCombiner(combiner);
|
return setCombiner(combiner);
|
||||||
}
|
}
|
||||||
return setCombiner([i, null, null]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function combinerRmv(i) {
|
function combinerRmv(i) {
|
||||||
combiner[i] = null;
|
combiner[i] = null;
|
||||||
@ -66,7 +64,16 @@ function Vbox(args) {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
const boundTds = range(0, 9).map(i => (
|
const boundTds = range(0, 9).map(i => {
|
||||||
|
if (combiner.indexOf(i) > -1) {
|
||||||
|
return (
|
||||||
|
<td
|
||||||
|
key={i}>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
return (
|
||||||
<td
|
<td
|
||||||
key={i}
|
key={i}
|
||||||
draggable="true"
|
draggable="true"
|
||||||
@ -74,7 +81,8 @@ function Vbox(args) {
|
|||||||
onClick={() => boundClick(i) }>
|
onClick={() => boundClick(i) }>
|
||||||
{convertVar(vbox.bound[i])}
|
{convertVar(vbox.bound[i])}
|
||||||
</td>
|
</td>
|
||||||
));
|
);
|
||||||
|
});
|
||||||
|
|
||||||
const boundRows = [
|
const boundRows = [
|
||||||
<tr key={0} >
|
<tr key={0} >
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user