@rpg-engine/long-bow 0.7.47 → 0.7.49
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 +2 -7
- 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 +2 -7
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Item/Inventory/ItemSlot.tsx +2 -7
package/package.json
CHANGED
|
@@ -142,7 +142,6 @@ export const ItemSlot = React.memo(
|
|
|
142
142
|
const [contextActions, setContextActions] = useState<IContextMenuItem[]>(
|
|
143
143
|
[]
|
|
144
144
|
);
|
|
145
|
-
const [isDragStarted, setIsDragStarted] = useState(false);
|
|
146
145
|
|
|
147
146
|
useEffect(() => {
|
|
148
147
|
setDragState(prev => ({
|
|
@@ -201,7 +200,6 @@ export const ItemSlot = React.memo(
|
|
|
201
200
|
|
|
202
201
|
const onDraggableStop: DraggableEventHandler = (e, data) => {
|
|
203
202
|
setDraggingItem(null);
|
|
204
|
-
setIsDragStarted(false);
|
|
205
203
|
|
|
206
204
|
const target = e.target as HTMLElement;
|
|
207
205
|
if (!target) return;
|
|
@@ -268,13 +266,12 @@ export const ItemSlot = React.memo(
|
|
|
268
266
|
}));
|
|
269
267
|
}
|
|
270
268
|
}, 50);
|
|
271
|
-
} else if (item
|
|
269
|
+
} else if (item) {
|
|
272
270
|
let isTouch = false;
|
|
273
271
|
if (
|
|
274
272
|
!isContextMenuDisabled &&
|
|
275
273
|
e.type === 'touchend' &&
|
|
276
|
-
!isSelectingShortcut
|
|
277
|
-
!dragState.wasDragged
|
|
274
|
+
!isSelectingShortcut
|
|
278
275
|
) {
|
|
279
276
|
isTouch = true;
|
|
280
277
|
setTooltipState(prev => ({ ...prev, mobileVisible: true }));
|
|
@@ -313,8 +310,6 @@ export const ItemSlot = React.memo(
|
|
|
313
310
|
return;
|
|
314
311
|
}
|
|
315
312
|
|
|
316
|
-
setIsDragStarted(true);
|
|
317
|
-
|
|
318
313
|
if (onDragStart && containerType) {
|
|
319
314
|
onDragStart(item, slotIndex, containerType);
|
|
320
315
|
}
|