@rpg-engine/long-bow 0.7.76 → 0.7.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/long-bow.cjs.development.js +5 -3
- package/dist/long-bow.cjs.development.js.map +1 -1
- package/dist/long-bow.cjs.production.min.js +1 -1
- package/dist/long-bow.cjs.production.min.js.map +1 -1
- package/dist/long-bow.esm.js +5 -3
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Item/Inventory/ItemSlot.tsx +7 -8
package/package.json
CHANGED
|
@@ -151,11 +151,7 @@ export const ItemSlot: React.FC<IProps> = observer(
|
|
|
151
151
|
setContextActions,
|
|
152
152
|
} = useItemSlotDetails();
|
|
153
153
|
|
|
154
|
-
const {
|
|
155
|
-
isContextMenuVisible,
|
|
156
|
-
|
|
157
|
-
clearContextActions,
|
|
158
|
-
} = detailsState;
|
|
154
|
+
const { isContextMenuVisible, clearContextActions } = detailsState;
|
|
159
155
|
|
|
160
156
|
const dragContainer = useRef<HTMLDivElement>(null);
|
|
161
157
|
|
|
@@ -188,10 +184,13 @@ export const ItemSlot: React.FC<IProps> = observer(
|
|
|
188
184
|
|
|
189
185
|
useEffect(() => {
|
|
190
186
|
// Handle outside drop
|
|
191
|
-
if (onDrop && item && dropPosition) {
|
|
192
|
-
|
|
187
|
+
if (onDrop && draggingState.item && dropPosition) {
|
|
188
|
+
console.log('ITEM SLOT: Outside drop', draggingState.item.key);
|
|
189
|
+
onDrop(draggingState.item, dropPosition);
|
|
190
|
+
|
|
191
|
+
clearDraggingState();
|
|
193
192
|
}
|
|
194
|
-
}, [dropPosition, onDrop, item]);
|
|
193
|
+
}, [dropPosition, onDrop, draggingState.item]);
|
|
195
194
|
|
|
196
195
|
const resetItem = () => {
|
|
197
196
|
clearDraggingState();
|