diff --git a/client/assets/styles/vbox.less b/client/assets/styles/vbox.less index fe62f0a2..0e0f9526 100644 --- a/client/assets/styles/vbox.less +++ b/client/assets/styles/vbox.less @@ -83,7 +83,7 @@ &.highlight { color: black; background: @white; - border: 1px solid @white; + // border: 1px solid @white; (this bangs around the vbox) // overwrite the classes on white svg elements svg { diff --git a/client/src/components/instance.constructs.jsx b/client/src/components/instance.constructs.jsx index 1e010061..a17aa221 100644 --- a/client/src/components/instance.constructs.jsx +++ b/client/src/components/instance.constructs.jsx @@ -223,7 +223,7 @@ function Construct(props) { const classes = `instance-construct ${mobileVisible ? 'visible' : ''}`; const avatarMouseOver = e => hoverInfo(e, `constructAvatar ${construct.name}`); return ( -
+
ev.preventDefault()} onDrop={onClick}>

hoverInfo(e, `constructName ${construct.name}`)}>{construct.name}

hoverInfo(e, 'constructSkills')} > diff --git a/client/src/components/vbox.component.jsx b/client/src/components/vbox.component.jsx index c2c1a51a..68f6dc5e 100644 --- a/client/src/components/vbox.component.jsx +++ b/client/src/components/vbox.component.jsx @@ -194,8 +194,6 @@ class Vbox extends preact.Component { e.stopPropagation(); setItemEquip(null); setCombiner([]); - - if (selected) return clearVboxSelected(); setInfo(vbox.free[group][index]); return setVboxSelected([group, index]); } @@ -217,28 +215,18 @@ class Vbox extends preact.Component { const classes = `${v.toLowerCase()} ${selected ? 'highlight' : ''} ${comboHighlight}`; - if (shapes[v]) { - return ( + const vboxObject = shapes[v] ? shapes[v]() : v; + return ( + ); } @@ -334,26 +322,19 @@ class Vbox extends preact.Component { const highlighted = combiner.indexOf(i) > -1; const border = buttons[removeTier(v)] ? buttons[removeTier(v)]() : ''; const classes = `${highlighted ? 'highlight' : border} ${comboHighlight}`; - if (shapes[v]) { - return ( + + const invObject = shapes[v] ? shapes[v]() : v; + + return ( +
- ); - } - - return ( - +
); } @@ -408,7 +389,10 @@ class Vbox extends preact.Component {
e.stopPropagation()} - style={vboxSelecting || (itemUnequip.length) ? { cursor: 'pointer' } : null}> + style={vboxSelecting || (itemUnequip.length) ? { cursor: 'pointer' } : null} + onDragOver={ev => ev.preventDefault()} + onDrop={inventoryClick} + >

e.target.scrollIntoView(true)}