@rpg-engine/long-bow 0.3.36 → 0.3.38

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.3.36",
3
+ "version": "0.3.38",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -83,7 +83,7 @@
83
83
  },
84
84
  "dependencies": {
85
85
  "@rollup/plugin-image": "^2.1.1",
86
- "@rpg-engine/shared": "^0.6.71",
86
+ "@rpg-engine/shared": "^0.6.73",
87
87
  "dayjs": "^1.11.2",
88
88
  "font-awesome": "^4.7.0",
89
89
  "fs-extra": "^10.1.0",
@@ -344,9 +344,14 @@ export const ItemSlot: React.FC<IProps> = observer(
344
344
  onDragStart(item, slotIndex, containerType);
345
345
  }
346
346
  }}
347
- onDrag={() => {
348
- setWasDragged(true);
349
- setIsFocused(true);
347
+ onDrag={(_e, data) => {
348
+ if (
349
+ Math.abs(data.x - dragPosition.x) > 5 ||
350
+ Math.abs(data.y - dragPosition.y) > 5
351
+ ) {
352
+ setWasDragged(true);
353
+ setIsFocused(true);
354
+ }
350
355
  }}
351
356
  position={dragPosition}
352
357
  cancel=".empty-slot"