Merge branch 'release/1.8.0' of ssh://git.mnml.gg:40022/~/mnml into release/1.8.0
This commit is contained in:
commit
9dd914a5d8
@ -297,29 +297,30 @@ class Vbox extends preact.Component {
|
||||
} return false;
|
||||
}) ? 'combo-border' : '';
|
||||
|
||||
function onClick(e) {
|
||||
function onClick(type) {
|
||||
if (vboxSelecting) clearVboxSelected();
|
||||
if (reclaiming) return sendVboxReclaim(i);
|
||||
|
||||
const combinerContainsIndex = combiner.indexOf(i) > -1;
|
||||
// 4 things selected
|
||||
if (combiner.length > 2) {
|
||||
if (combiner.length > 2 && !combinerContainsIndex) {
|
||||
setInfo(vbox.bound[i]);
|
||||
return combinerChange([i]);
|
||||
}
|
||||
// removing
|
||||
const combinerIndex = combiner.indexOf(i);
|
||||
if (combinerIndex > -1) {
|
||||
if (combinerContainsIndex) {
|
||||
if (type === 'click') {
|
||||
return combinerChange(without(combiner, i));
|
||||
}
|
||||
return true;
|
||||
// return combinerChange(without(combiner, i));
|
||||
}
|
||||
|
||||
combiner.push(i);
|
||||
|
||||
if (!comboHighlight) {
|
||||
if (!comboHighlight && !combinerContainsIndex) {
|
||||
setInfo(vbox.bound[i]);
|
||||
return combinerChange([i]);
|
||||
}
|
||||
|
||||
combiner.push(i);
|
||||
return combinerChange(combiner);
|
||||
}
|
||||
|
||||
@ -334,17 +335,14 @@ class Vbox extends preact.Component {
|
||||
key={i}
|
||||
draggable='true'
|
||||
onDragStart={ev => {
|
||||
onClick(ev);
|
||||
onClick('drag');
|
||||
ev.dataTransfer.setData('text', '');
|
||||
}}
|
||||
onDragEnd={() => {
|
||||
if (combiner.length === 1) combinerChange([]);
|
||||
}}>
|
||||
<button
|
||||
class={classes}
|
||||
onMouseOver={e => vboxHover(e, v)}
|
||||
onClick={e => e.stopPropagation()}
|
||||
onMouseDown={onClick}>
|
||||
onMouseDown={() => onClick('click')}>
|
||||
{invObject}
|
||||
</button>
|
||||
</label>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user