@rpg-engine/long-bow 0.7.46 → 0.7.48

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.
@@ -27936,6 +27936,9 @@ var ItemSlot = /*#__PURE__*/React__default.memo( /*#__PURE__*/mobxReactLite.obse
27936
27936
  var _useState4 = React.useState([]),
27937
27937
  contextActions = _useState4[0],
27938
27938
  setContextActions = _useState4[1];
27939
+ var _useState5 = React.useState(false),
27940
+ isDragStarted = _useState5[0],
27941
+ setIsDragStarted = _useState5[1];
27939
27942
  React.useEffect(function () {
27940
27943
  setDragState(function (prev) {
27941
27944
  return _extends({}, prev, {
@@ -28006,6 +28009,7 @@ var ItemSlot = /*#__PURE__*/React__default.memo( /*#__PURE__*/mobxReactLite.obse
28006
28009
  };
28007
28010
  var onDraggableStop = function onDraggableStop(e, data) {
28008
28011
  setDraggingItem(null);
28012
+ setIsDragStarted(false);
28009
28013
  var target = e.target;
28010
28014
  if (!target) return;
28011
28015
  if (target != null && target.id.includes('shortcutSetter') && setItemShortcut && item) {
@@ -28072,9 +28076,9 @@ var ItemSlot = /*#__PURE__*/React__default.memo( /*#__PURE__*/mobxReactLite.obse
28072
28076
  });
28073
28077
  }
28074
28078
  }, 50);
28075
- } else if (item && !dragState.wasDragged) {
28079
+ } else if (item && !isDragStarted) {
28076
28080
  var isTouch = false;
28077
- if (!isContextMenuDisabled && e.type === 'touchend' && !isSelectingShortcut) {
28081
+ if (!isContextMenuDisabled && e.type === 'touchend' && !isSelectingShortcut && !dragState.wasDragged) {
28078
28082
  isTouch = true;
28079
28083
  setTooltipState(function (prev) {
28080
28084
  return _extends({}, prev, {
@@ -28082,7 +28086,7 @@ var ItemSlot = /*#__PURE__*/React__default.memo( /*#__PURE__*/mobxReactLite.obse
28082
28086
  });
28083
28087
  });
28084
28088
  }
28085
- if (!isContextMenuDisabled && !isSelectingShortcut && !isTouch) {
28089
+ if (!isContextMenuDisabled && !isSelectingShortcut && !isTouch && !dragState.wasDragged) {
28086
28090
  setContextMenuState(function (prev) {
28087
28091
  return _extends({}, prev, {
28088
28092
  visible: !contextMenuState.visible
@@ -28107,6 +28111,7 @@ var ItemSlot = /*#__PURE__*/React__default.memo( /*#__PURE__*/mobxReactLite.obse
28107
28111
  if (!item || isSelectingShortcut) {
28108
28112
  return;
28109
28113
  }
28114
+ setIsDragStarted(true);
28110
28115
  if (onDragStart && containerType) {
28111
28116
  onDragStart(item, slotIndex, containerType);
28112
28117
  }