publ-echo-test 0.0.100 → 0.0.102

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.
@@ -207,7 +207,6 @@ var ReactGridLayout = function (_a) {
207
207
  if (!oldDragItem) {
208
208
  return;
209
209
  }
210
- // console.log(x, y)
211
210
  var xgap = x - oldDragItem.x;
212
211
  var ygap = y - oldDragItem.y;
213
212
  var placeholder = {
@@ -452,16 +452,16 @@ export var findAccessibleChildrenBlocks = function (blockStructure, targetGroupI
452
452
  return [];
453
453
  }
454
454
  var result = new Set();
455
- var traverse = function (block) {
455
+ var traverse = function (block, rootId) {
456
456
  if ('children' in block && block.children) {
457
457
  for (var _i = 0, _a = block.children; _i < _a.length; _i++) {
458
458
  var child = _a[_i];
459
459
  if (blockIds.includes(child.blockId)) {
460
- result.add(block.blockId);
460
+ result.add(rootId);
461
461
  return true; // Stop traversal for this branch
462
462
  }
463
- if (traverse(child)) {
464
- result.add(block.blockId);
463
+ if (traverse(child, rootId)) {
464
+ result.add(rootId);
465
465
  return true; // Stop traversal for this branch
466
466
  }
467
467
  }
@@ -474,7 +474,7 @@ export var findAccessibleChildrenBlocks = function (blockStructure, targetGroupI
474
474
  result.add(child.blockId);
475
475
  }
476
476
  else {
477
- traverse(child);
477
+ traverse(child, child.blockId);
478
478
  }
479
479
  }
480
480
  return Array.from(result);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo-test",
3
- "version": "0.0.100",
3
+ "version": "0.0.102",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",