@rpg-engine/long-bow 0.7.68 → 0.7.71
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/components/Item/Inventory/ItemSlot.d.ts +2 -17
- package/dist/components/Item/Inventory/ItemSlotTooltips.d.ts +10 -7
- package/dist/components/Item/Inventory/context/DraggingContext.d.ts +2 -17
- package/dist/long-bow.cjs.development.js +334 -354
- 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 +335 -355
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Item/Inventory/ItemContainer.tsx +2 -2
- package/src/components/Item/Inventory/ItemSlot.tsx +441 -252
- package/src/components/Item/Inventory/ItemSlotTooltips.tsx +22 -18
- package/src/components/Item/Inventory/context/DraggingContext.tsx +5 -31
- package/src/mocks/skills.mocks.ts +0 -4
- package/src/stories/UI/containers/ItemContainer.stories.tsx +3 -30
- package/dist/components/Item/Inventory/hooks/useItemSlotDragAndDrop.d.ts +0 -43
- package/src/components/Item/Inventory/hooks/useItemSlotDragAndDrop.ts +0 -228
package/package.json
CHANGED
|
@@ -87,6 +87,7 @@ export const ItemContainer: React.FC<IItemContainerProps> = ({
|
|
|
87
87
|
onOutsideDrop,
|
|
88
88
|
checkIfItemCanBeMoved,
|
|
89
89
|
initialPosition,
|
|
90
|
+
checkIfItemShouldDragEnd,
|
|
90
91
|
scale,
|
|
91
92
|
shortcuts,
|
|
92
93
|
setItemShortcut,
|
|
@@ -144,7 +145,6 @@ export const ItemContainer: React.FC<IItemContainerProps> = ({
|
|
|
144
145
|
}, [handleMouseMove, onItemDragStart, stopScrolling]);
|
|
145
146
|
|
|
146
147
|
const onDragStart: onDragStart = (item, slotIndex, itemContainerType) => {
|
|
147
|
-
console.log('DRAG START');
|
|
148
148
|
if (onItemDragStart) {
|
|
149
149
|
onItemDragStart(item, slotIndex, itemContainerType);
|
|
150
150
|
}
|
|
@@ -153,7 +153,6 @@ export const ItemContainer: React.FC<IItemContainerProps> = ({
|
|
|
153
153
|
};
|
|
154
154
|
|
|
155
155
|
const onDragEnd: onDragEnd = quantity => {
|
|
156
|
-
console.log('DRAG END');
|
|
157
156
|
if (onItemDragEnd) {
|
|
158
157
|
onItemDragEnd(quantity);
|
|
159
158
|
}
|
|
@@ -190,6 +189,7 @@ export const ItemContainer: React.FC<IItemContainerProps> = ({
|
|
|
190
189
|
onDragEnd={onDragEnd}
|
|
191
190
|
dragScale={scale}
|
|
192
191
|
checkIfItemCanBeMoved={checkIfItemCanBeMoved}
|
|
192
|
+
checkIfItemShouldDragEnd={checkIfItemShouldDragEnd}
|
|
193
193
|
openQuantitySelector={(maxQuantity, callback) => {
|
|
194
194
|
setQuantitySelect({
|
|
195
195
|
isOpen: true,
|