@rpg-engine/long-bow 0.1.79 → 0.1.792
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 +10 -10
- 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 +10 -10
- package/dist/long-bow.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Equipment/EquipmentSet.tsx +12 -11
package/dist/long-bow.esm.js
CHANGED
|
@@ -6133,10 +6133,11 @@ var EquipmentSet = /*#__PURE__*/observer(function (_ref) {
|
|
|
6133
6133
|
accessory = equipmentSet.accessory;
|
|
6134
6134
|
var equipmentData = [neck, leftHand, ring, head, armor, legs, boot, inventory, rightHand, accessory];
|
|
6135
6135
|
var equipmentMaskSlots = [ItemSlotType.Neck, ItemSlotType.LeftHand, ItemSlotType.Ring, ItemSlotType.Head, ItemSlotType.Torso, ItemSlotType.Legs, ItemSlotType.Feet, ItemSlotType.Inventory, ItemSlotType.RightHand, ItemSlotType.Accessory]; // we use this draggable position to offset the menu position, after the container is dragged (otherwise, it bugs!)
|
|
6136
|
+
// uiStore.setDraggablePosition(initialPosition)
|
|
6136
6137
|
|
|
6137
|
-
|
|
6138
|
-
|
|
6139
|
-
|
|
6138
|
+
var _useState = useState(initialPosition),
|
|
6139
|
+
draggablePosition = _useState[0],
|
|
6140
|
+
setDraggablePosition = _useState[1];
|
|
6140
6141
|
|
|
6141
6142
|
var handleOnMouseHover = function handleOnMouseHover(event, slotIndex, item, x, y) {
|
|
6142
6143
|
uiStore.handleOnMouseHover(event, slotIndex, item, x, y, onMouseOver);
|
|
@@ -6184,11 +6185,10 @@ var EquipmentSet = /*#__PURE__*/observer(function (_ref) {
|
|
|
6184
6185
|
onPositionChange: function onPositionChange(_ref3) {
|
|
6185
6186
|
var x = _ref3.x,
|
|
6186
6187
|
y = _ref3.y;
|
|
6187
|
-
|
|
6188
|
-
uiStore.setDraggablePosition({
|
|
6188
|
+
setDraggablePosition({
|
|
6189
6189
|
x: x,
|
|
6190
6190
|
y: y
|
|
6191
|
-
});
|
|
6191
|
+
}); // uiStore.setDraggablePosition({ x, y });
|
|
6192
6192
|
},
|
|
6193
6193
|
onOutsideClick: function onOutsideClick() {
|
|
6194
6194
|
uiStore.clearContextMenu();
|
|
@@ -6197,14 +6197,14 @@ var EquipmentSet = /*#__PURE__*/observer(function (_ref) {
|
|
|
6197
6197
|
}, React.createElement(EquipmentSetContainer, {
|
|
6198
6198
|
className: "equipment-container-body"
|
|
6199
6199
|
}, React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(0, 3)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(3, 7)), React.createElement(EquipmentColumn, null, onRenderEquipmentSlotRange(7, 10))), (_uiStore$contextMenu = uiStore.contextMenu) != null && _uiStore$contextMenu.visible ? React.createElement(ListMenu, {
|
|
6200
|
-
x: uiStore.contextMenu.posX -
|
|
6201
|
-
y: uiStore.contextMenu.posY -
|
|
6200
|
+
x: uiStore.contextMenu.posX - draggablePosition.x,
|
|
6201
|
+
y: uiStore.contextMenu.posY - draggablePosition.y,
|
|
6202
6202
|
options: uiStore.contextMenu.contextActions,
|
|
6203
6203
|
onSelected: onSelected
|
|
6204
6204
|
}) : null, (_uiStore$onHoverDetai = uiStore.onHoverDetail) != null && _uiStore$onHoverDetai.visible ? React.createElement(ItemCard, {
|
|
6205
6205
|
item: uiStore.onHoverDetail.item,
|
|
6206
|
-
x: uiStore.onHoverDetail.posX
|
|
6207
|
-
y: uiStore.onHoverDetail.posY
|
|
6206
|
+
x: uiStore.onHoverDetail.posX,
|
|
6207
|
+
y: uiStore.onHoverDetail.posY
|
|
6208
6208
|
}) : null);
|
|
6209
6209
|
});
|
|
6210
6210
|
var EquipmentSetContainer = /*#__PURE__*/styled.div.withConfig({
|