@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rpg-engine/long-bow",
3
- "version": "0.5.19",
3
+ "version": "0.5.21",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -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={width ?? '415px'}
38
+ width="450px"
41
39
  cancelDrag=".item-container-body, #shortcuts_list"
42
40
  onPositionChange={({ x, y }) => {
43
41
  if (onPositionChange) {
@@ -218,7 +218,7 @@ const ItemsContainer = styled.div`
218
218
  max-height: 270px;
219
219
  overflow-y: auto;
220
220
  overflow-x: hidden;
221
- width: 415px;
221
+ width: 450px;
222
222
  `;
223
223
 
224
224
  const QuantitySelectorContainer = styled.div`
@@ -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: 64px;
580
- height: 64px;
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