publ-echo-test 0.0.355 → 0.0.357
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.
|
@@ -594,8 +594,12 @@ var ReactGridLayout = function (_a) {
|
|
|
594
594
|
var zIndex = editorMode === "EDIT" ? editorZIndex : z;
|
|
595
595
|
// Check if a layout item overlaps any of the activeRows (vertical overlap)
|
|
596
596
|
var isOverlappingActiveRows = function (item) {
|
|
597
|
-
if (!
|
|
597
|
+
if (!(activeDragItemOrSelectedItem === null || activeDragItemOrSelectedItem === void 0 ? void 0 : activeDragItemOrSelectedItem.heightFitContent)) {
|
|
598
598
|
return false;
|
|
599
|
+
}
|
|
600
|
+
if (!activeRows || activeRows.length === 0) {
|
|
601
|
+
return false;
|
|
602
|
+
}
|
|
599
603
|
var minActive = Math.min.apply(Math, activeRows);
|
|
600
604
|
var maxActive = Math.max.apply(Math, activeRows);
|
|
601
605
|
var itemTop = item.y;
|
|
@@ -770,10 +774,11 @@ var ReactGridLayout = function (_a) {
|
|
|
770
774
|
var selectedLayoutItem = selectedBlockId
|
|
771
775
|
? getLayoutItem(layout, selectedBlockId)
|
|
772
776
|
: null;
|
|
773
|
-
var
|
|
774
|
-
|
|
775
|
-
|
|
777
|
+
var activeDragItemOrSelectedItem = activeDrag || selectedLayoutItem;
|
|
778
|
+
var activeRows = activeDragItemOrSelectedItem &&
|
|
779
|
+
Array.from({ length: activeDragItemOrSelectedItem.h }, function (_, i) { return activeDragItemOrSelectedItem.y + i; });
|
|
780
|
+
return (_jsxs("div", { ref: innerRef, className: mergedClassName, style: mergedStyle, onDrop: isDroppable ? onDropHandler : noop, onDragLeave: isDroppable ? onDragLeaveHandler : noop, onDragEnter: isDroppable ? onDragEnterHandler : noop, onDragOver: isDroppable ? onDragOverHandler : noop, "data-grid-row-height": rowHeight, "data-grid-cols": cols, "data-section-id": sectionId, children: [currentGroupBlocks.map(function (each) { return processGroup(each); }), React.Children.map(children, function (child) { return processGridItem(child); }), placeholder(), activeDrag && _jsx("div", { className: "grid-guide-line-center" }), activeDragItemOrSelectedItem && (_jsx(GridBackgroundPlaceholder, { backgroundWidth: getBackgroundWidth(), backgroundHeight: getBackgroundHeight(), margin: margin,
|
|
776
781
|
// width={width}
|
|
777
|
-
rowHeight: rowHeight, colWidth: colWidth, activeDrag:
|
|
782
|
+
rowHeight: rowHeight, colWidth: colWidth, activeDrag: activeDragItemOrSelectedItem, selectedBlockId: selectedBlockId, totalCols: cols }))] }));
|
|
778
783
|
};
|
|
779
784
|
export default ReactGridLayout;
|