@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.
@@ -27930,6 +27930,9 @@ var ItemSlot = /*#__PURE__*/React.memo( /*#__PURE__*/observer(function (_ref) {
27930
27930
  var _useState4 = useState([]),
27931
27931
  contextActions = _useState4[0],
27932
27932
  setContextActions = _useState4[1];
27933
+ var _useState5 = useState(false),
27934
+ isDragStarted = _useState5[0],
27935
+ setIsDragStarted = _useState5[1];
27933
27936
  useEffect(function () {
27934
27937
  setDragState(function (prev) {
27935
27938
  return _extends({}, prev, {
@@ -28000,6 +28003,7 @@ var ItemSlot = /*#__PURE__*/React.memo( /*#__PURE__*/observer(function (_ref) {
28000
28003
  };
28001
28004
  var onDraggableStop = function onDraggableStop(e, data) {
28002
28005
  setDraggingItem(null);
28006
+ setIsDragStarted(false);
28003
28007
  var target = e.target;
28004
28008
  if (!target) return;
28005
28009
  if (target != null && target.id.includes('shortcutSetter') && setItemShortcut && item) {
@@ -28066,9 +28070,9 @@ var ItemSlot = /*#__PURE__*/React.memo( /*#__PURE__*/observer(function (_ref) {
28066
28070
  });
28067
28071
  }
28068
28072
  }, 50);
28069
- } else if (item && !dragState.wasDragged) {
28073
+ } else if (item && !isDragStarted) {
28070
28074
  var isTouch = false;
28071
- if (!isContextMenuDisabled && e.type === 'touchend' && !isSelectingShortcut) {
28075
+ if (!isContextMenuDisabled && e.type === 'touchend' && !isSelectingShortcut && !dragState.wasDragged) {
28072
28076
  isTouch = true;
28073
28077
  setTooltipState(function (prev) {
28074
28078
  return _extends({}, prev, {
@@ -28076,7 +28080,7 @@ var ItemSlot = /*#__PURE__*/React.memo( /*#__PURE__*/observer(function (_ref) {
28076
28080
  });
28077
28081
  });
28078
28082
  }
28079
- if (!isContextMenuDisabled && !isSelectingShortcut && !isTouch) {
28083
+ if (!isContextMenuDisabled && !isSelectingShortcut && !isTouch && !dragState.wasDragged) {
28080
28084
  setContextMenuState(function (prev) {
28081
28085
  return _extends({}, prev, {
28082
28086
  visible: !contextMenuState.visible
@@ -28101,6 +28105,7 @@ var ItemSlot = /*#__PURE__*/React.memo( /*#__PURE__*/observer(function (_ref) {
28101
28105
  if (!item || isSelectingShortcut) {
28102
28106
  return;
28103
28107
  }
28108
+ setIsDragStarted(true);
28104
28109
  if (onDragStart && containerType) {
28105
28110
  onDragStart(item, slotIndex, containerType);
28106
28111
  }