react-sync-board 0.5.2 → 0.5.3

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/cjs/index.js CHANGED
@@ -8052,7 +8052,6 @@ var useItemActions = function useItemActions() {
8052
8052
  _ref19$passLocked,
8053
8053
  passLocked,
8054
8054
  foundElement,
8055
- isPassthrough,
8056
8055
  itemList,
8057
8056
  _yield$snapshot$getPr2,
8058
8057
  boardWrapper,
@@ -8079,35 +8078,40 @@ var useItemActions = function useItemActions() {
8079
8078
  foundElement = insideClass(target, "item");
8080
8079
 
8081
8080
  if (!foundElement) {
8082
- _context8.next = 27;
8081
+ _context8.next = 28;
8083
8082
  break;
8084
8083
  }
8085
8084
 
8086
- if (!(!passLocked && hasClass(foundElement, "locked") && !hasClass(foundElement, "selected"))) {
8085
+ if (!hasClass(foundElement, "selected")) {
8087
8086
  _context8.next = 8;
8088
8087
  break;
8089
8088
  }
8090
8089
 
8091
- return _context8.abrupt("return", null);
8090
+ return _context8.abrupt("return", foundElement);
8092
8091
 
8093
8092
  case 8:
8094
- // Is it a passthrough element?
8095
- isPassthrough = (hasClass(target, "passthrough") || !returnLocked && hasClass(foundElement, "locked")) && !hasClass(foundElement, "selected");
8093
+ if (!(!passLocked && hasClass(foundElement, "locked") && !hasClass(target, "passthrough"))) {
8094
+ _context8.next = 10;
8095
+ break;
8096
+ }
8096
8097
 
8097
- if (!isPassthrough) {
8098
- _context8.next = 27;
8098
+ return _context8.abrupt("return", returnLocked ? foundElement : null);
8099
+
8100
+ case 10:
8101
+ if (!hasClass(target, "passthrough")) {
8102
+ _context8.next = 28;
8099
8103
  break;
8100
8104
  }
8101
8105
 
8102
- _context8.next = 12;
8106
+ _context8.next = 13;
8103
8107
  return snapshot.getPromise(ItemListAtom);
8104
8108
 
8105
- case 12:
8109
+ case 13:
8106
8110
  itemList = _context8.sent;
8107
- _context8.next = 15;
8111
+ _context8.next = 16;
8108
8112
  return snapshot.getPromise(ConfigurationAtom);
8109
8113
 
8110
- case 15:
8114
+ case 16:
8111
8115
  _yield$snapshot$getPr2 = _context8.sent;
8112
8116
  boardWrapper = _yield$snapshot$getPr2.boardWrapper;
8113
8117
  // Found element under the cursor
@@ -8127,33 +8131,33 @@ var useItemActions = function useItemActions() {
8127
8131
 
8128
8132
  i = 0;
8129
8133
 
8130
- case 19:
8134
+ case 20:
8131
8135
  if (!(i < elems.length)) {
8132
- _context8.next = 26;
8136
+ _context8.next = 27;
8133
8137
  break;
8134
8138
  }
8135
8139
 
8136
8140
  elem = elems[i];
8137
8141
 
8138
- if (!(elem !== foundElement && (returnLocked || !hasClass(elem, "locked")))) {
8139
- _context8.next = 23;
8142
+ if (!(elem !== foundElement && (passLocked || !hasClass(elem, "locked")))) {
8143
+ _context8.next = 24;
8140
8144
  break;
8141
8145
  }
8142
8146
 
8143
8147
  return _context8.abrupt("return", elem);
8144
8148
 
8145
- case 23:
8149
+ case 24:
8146
8150
  i += 1;
8147
- _context8.next = 19;
8151
+ _context8.next = 20;
8148
8152
  break;
8149
8153
 
8150
- case 26:
8154
+ case 27:
8151
8155
  return _context8.abrupt("return", null);
8152
8156
 
8153
- case 27:
8157
+ case 28:
8154
8158
  return _context8.abrupt("return", foundElement);
8155
8159
 
8156
- case 28:
8160
+ case 29:
8157
8161
  case "end":
8158
8162
  return _context8.stop();
8159
8163
  }