@rpg-engine/long-bow 0.5.19 → 0.5.21
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/Abstractions/SlotsContainer.d.ts +0 -1
- package/dist/long-bow.cjs.development.js +4 -11
- 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 +4 -11
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Abstractions/SlotsContainer.tsx +1 -3
- package/src/components/Item/Inventory/ItemContainer.tsx +1 -1
- package/src/components/Item/Inventory/ItemSlot.tsx +6 -12
package/package.json
CHANGED
|
@@ -13,7 +13,6 @@ interface IProps {
|
|
|
13
13
|
onOutsideClick?: () => void;
|
|
14
14
|
initialPosition?: IPosition;
|
|
15
15
|
scale?: number;
|
|
16
|
-
width?: string;
|
|
17
16
|
}
|
|
18
17
|
|
|
19
18
|
export const SlotsContainer: React.FC<IProps> = ({
|
|
@@ -26,7 +25,6 @@ export const SlotsContainer: React.FC<IProps> = ({
|
|
|
26
25
|
onOutsideClick,
|
|
27
26
|
initialPosition,
|
|
28
27
|
scale,
|
|
29
|
-
width,
|
|
30
28
|
}) => {
|
|
31
29
|
return (
|
|
32
30
|
<DraggableContainer
|
|
@@ -37,7 +35,7 @@ export const SlotsContainer: React.FC<IProps> = ({
|
|
|
37
35
|
onClose();
|
|
38
36
|
}
|
|
39
37
|
}}
|
|
40
|
-
width=
|
|
38
|
+
width="450px"
|
|
41
39
|
cancelDrag=".item-container-body, #shortcuts_list"
|
|
42
40
|
onPositionChange={({ x, y }) => {
|
|
43
41
|
if (onPositionChange) {
|
|
@@ -123,13 +123,6 @@ export const ItemSlot: React.FC<IProps> = observer(
|
|
|
123
123
|
const [dropPosition, setDropPosition] = useState<IPosition | null>(null);
|
|
124
124
|
const dragContainer = useRef<HTMLDivElement>(null);
|
|
125
125
|
|
|
126
|
-
useEffect(() => {
|
|
127
|
-
// This fixes an issue where if you drag an item inside of a scrollable container (overflow), its cut out
|
|
128
|
-
if (dragContainer.current) {
|
|
129
|
-
dragContainer.current.style.position = 'fixed';
|
|
130
|
-
}
|
|
131
|
-
}, []);
|
|
132
|
-
|
|
133
126
|
const [contextActions, setContextActions] = useState<IContextMenuItem[]>(
|
|
134
127
|
[]
|
|
135
128
|
);
|
|
@@ -532,10 +525,9 @@ const Container = styled.div<ContainerTypes>`
|
|
|
532
525
|
margin: 0.1rem;
|
|
533
526
|
|
|
534
527
|
.react-draggable-dragging {
|
|
535
|
-
opacity: 0.5;
|
|
528
|
+
opacity: 0.5;
|
|
536
529
|
}
|
|
537
|
-
|
|
538
|
-
|
|
530
|
+
|
|
539
531
|
.sprite-from-atlas-img--item {
|
|
540
532
|
position: relative;
|
|
541
533
|
top: 1.5rem;
|
|
@@ -576,8 +568,10 @@ const Container = styled.div<ContainerTypes>`
|
|
|
576
568
|
`;
|
|
577
569
|
|
|
578
570
|
const ItemContainer = styled.div<{ isFocused?: boolean }>`
|
|
579
|
-
width:
|
|
580
|
-
height:
|
|
571
|
+
width: 100%;
|
|
572
|
+
height: 100%;
|
|
573
|
+
position: relative;
|
|
574
|
+
|
|
581
575
|
${props => props.isFocused && 'z-index: 100; pointer-events: none;'}
|
|
582
576
|
`;
|
|
583
577
|
|