publ-echo-test 0.0.130 → 0.0.132
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.
@@ -561,13 +561,16 @@ var ReactGridLayout = function (_a) {
|
|
561
561
|
// return zIndexMap.EDITING_GROUP;
|
562
562
|
// }
|
563
563
|
if (!isRoot && isInBulk) {
|
564
|
-
return zIndexMap.
|
564
|
+
return zIndexMap.EDITING_GROUP_CHILD + zOrder;
|
565
565
|
}
|
566
566
|
if (!isRoot && editable) {
|
567
|
-
return zIndexMap.
|
567
|
+
return zIndexMap.EDITING_GROUP_CHILD + zOrder;
|
568
568
|
}
|
569
569
|
if (isRoot && editable) {
|
570
|
-
return zIndexMap.ROOT;
|
570
|
+
return zIndexMap.ROOT + zOrder;
|
571
|
+
}
|
572
|
+
if (isRoot && !editable) {
|
573
|
+
return zIndexMap.ROOT + zOrder;
|
571
574
|
}
|
572
575
|
if (!editable) {
|
573
576
|
return 0;
|
@@ -666,13 +669,16 @@ var ReactGridLayout = function (_a) {
|
|
666
669
|
var isInBulk = bulkIds === null || bulkIds === void 0 ? void 0 : bulkIds.includes(block.blockId);
|
667
670
|
var isBulk = block.blockId === 'BULK';
|
668
671
|
var baseZ = (function () {
|
669
|
-
if (
|
672
|
+
if (isEditingGroup) {
|
670
673
|
return zIndexMap.EDITING_GROUP;
|
671
674
|
}
|
672
|
-
if (
|
675
|
+
if (isBulk) {
|
676
|
+
return zIndexMap.EDITING_GROUP_CHILD + zOrder;
|
677
|
+
}
|
678
|
+
if (isInBulk) { // 위와 같지만 이것은 not-editable이긴 함.
|
673
679
|
// const bulkBlock = findBlockByBlockId(blockStructure, 'BULK');
|
674
680
|
// const bulkZOrder = bulkBlock?.[device === 'DESKTOP' ? 'zOrderDesktopInternal' : 'zOrderMobileInternal'] ?? 0;
|
675
|
-
return zIndexMap.
|
681
|
+
return zIndexMap.EDITING_GROUP_CHILD + zOrder;
|
676
682
|
}
|
677
683
|
if (!isRoot && type === 'GROUP_BLOCK') {
|
678
684
|
return zIndexMap.EDITING_GROUP;
|
@@ -685,7 +691,7 @@ var ReactGridLayout = function (_a) {
|
|
685
691
|
}
|
686
692
|
return zIndexMap.CB;
|
687
693
|
})();
|
688
|
-
var zIndex = editorMode === 'EDIT' ? baseZ
|
694
|
+
var zIndex = editorMode === 'EDIT' ? baseZ : zOrder;
|
689
695
|
var handleClick = function (e) {
|
690
696
|
onClickGroup && onClickGroup(e, block.blockId, type);
|
691
697
|
};
|
@@ -9,7 +9,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
9
9
|
};
|
10
10
|
export var zIndexMap = {
|
11
11
|
'BULK': 20000,
|
12
|
-
'
|
12
|
+
'EDITING_GROUP_CHILD': 10000,
|
13
|
+
'EDITING_GROUP': 9000,
|
13
14
|
'GROUP': 5000,
|
14
15
|
'CB': 500,
|
15
16
|
'ROOT': 500, //?
|
@@ -211,12 +212,16 @@ export var addBulkToTarget = function (block, targetId, bulkBlockIds) {
|
|
211
212
|
}
|
212
213
|
// Remove bulk blocks from target's children
|
213
214
|
targetBlock.children = targetBlock.children.filter(function (child) { return !bulkBlockIds.includes(child.blockId); });
|
215
|
+
var zOrdersDesktop = bulkBlocks.map(function (block) { return block.zOrderDesktopInternal; }).filter(function (each) { return each !== null; });
|
216
|
+
var zOrdersMobile = bulkBlocks.map(function (block) { return block.zOrderMobileInternal; }).filter(function (each) { return each !== null; });
|
217
|
+
var zOrderDesktopInternal = Math.max.apply(Math, zOrdersDesktop);
|
218
|
+
var zOrderMobileInternal = Math.max.apply(Math, zOrdersMobile);
|
214
219
|
// Create the new bulkBlock
|
215
220
|
var bulkBlock = {
|
216
221
|
blockId: 'BULK',
|
217
222
|
type: 'GROUP_BLOCK',
|
218
|
-
zOrderDesktopInternal:
|
219
|
-
zOrderMobileInternal:
|
223
|
+
zOrderDesktopInternal: zOrderDesktopInternal,
|
224
|
+
zOrderMobileInternal: zOrderMobileInternal,
|
220
225
|
children: bulkBlocks,
|
221
226
|
};
|
222
227
|
// Add the bulkBlock to the target's children
|
@@ -243,7 +248,7 @@ var findPath = function (block, id, path) {
|
|
243
248
|
return null;
|
244
249
|
};
|
245
250
|
export var getBlockWorkDirPath = function (block, blockId) {
|
246
|
-
var path = findPath(block, blockId, ['']);
|
251
|
+
var path = findPath(block, blockId, ['/ROOT']);
|
247
252
|
return path ? path.join('/') : null;
|
248
253
|
};
|
249
254
|
export function formatBlockIdToCbId(blockId) {
|