publ-echo-test 0.0.344 → 0.0.346
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.
|
@@ -9,5 +9,6 @@ type PlaceholderProps = {
|
|
|
9
9
|
activeDrag: LayoutItem;
|
|
10
10
|
selectedBlockId: string | null;
|
|
11
11
|
};
|
|
12
|
-
export declare function GridBackgroundPlaceholder({ margin, width, rowHeight, colWidth, backgroundWidth, backgroundHeight,
|
|
12
|
+
export declare function GridBackgroundPlaceholder({ margin, width, rowHeight, colWidth, backgroundWidth, backgroundHeight, // 부모로부터 "1500px" 같은 정확한 값을 받음
|
|
13
|
+
activeDrag, selectedBlockId, }: PlaceholderProps): import("react/jsx-runtime").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
export function GridBackgroundPlaceholder(_a) {
|
|
3
|
-
var margin = _a.margin, width = _a.width, rowHeight = _a.rowHeight, colWidth = _a.colWidth, backgroundWidth = _a.backgroundWidth, backgroundHeight = _a.backgroundHeight,
|
|
4
|
-
|
|
3
|
+
var margin = _a.margin, width = _a.width, rowHeight = _a.rowHeight, colWidth = _a.colWidth, backgroundWidth = _a.backgroundWidth, backgroundHeight = _a.backgroundHeight, // 부모로부터 "1500px" 같은 정확한 값을 받음
|
|
4
|
+
activeDrag = _a.activeDrag, selectedBlockId = _a.selectedBlockId;
|
|
5
|
+
// 활성화된 행(row) 인덱스 배열
|
|
5
6
|
var activeRows = Array.from({ length: activeDrag.h }, function (_, i) { return activeDrag.y + i; });
|
|
7
|
+
// 활성화된 열(column) 인덱스 배열 (24개 하드코딩)
|
|
6
8
|
var activeCols = Array.from({ length: 24 }, function (_, i) { return 0 + i; });
|
|
9
|
+
var textPadding = 10;
|
|
10
|
+
console.log("bg-width", backgroundWidth);
|
|
7
11
|
return (_jsx("div", { className: "grid-placeholder", style: {
|
|
8
12
|
marginTop: margin[1] + "px",
|
|
9
13
|
marginBottom: margin[1] + "px",
|
|
10
14
|
marginLeft: margin[0] + "px",
|
|
11
15
|
marginRight: margin[0] + "px",
|
|
12
|
-
}, children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: backgroundWidth, height: backgroundHeight, children: [_jsx("defs", { children: _jsx("pattern", { id: "grid-pattern", height: rowHeight + margin[1], width: colWidth + margin[0], patternUnits: "userSpaceOnUse", children: _jsx("rect", { x: 0.5, y: 0.5, className: "grid-pattern-rect" // 기본
|
|
16
|
+
}, children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: backgroundWidth, height: backgroundHeight, overflow: "visible", children: [_jsx("defs", { children: _jsx("pattern", { id: "grid-pattern", height: rowHeight + margin[1], width: colWidth + margin[0], patternUnits: "userSpaceOnUse", children: _jsx("rect", { x: 0.5, y: 0.5, className: "grid-pattern-rect" // 기본 셀 스타일
|
|
13
17
|
, height: rowHeight, width: colWidth }) }) }), _jsx("rect", { width: width, height: "100%", fill: "url(#grid-pattern)" }), activeDrag &&
|
|
14
18
|
activeRows.map(function (row) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
className: "grid-active-cell-placeholder" }, "".concat(row, "-").concat(col)));
|
|
22
|
-
});
|
|
19
|
+
var y_top = row * (rowHeight + margin[1]) + 0.5;
|
|
20
|
+
var y_center = y_top + rowHeight / 2;
|
|
21
|
+
return (_jsxs("g", { children: [activeCols.map(function (col) {
|
|
22
|
+
var x = col * (colWidth + margin[0]) + 0.5;
|
|
23
|
+
return (_jsx("rect", { x: x, y: y_top, width: colWidth, height: rowHeight, className: "grid-active-cell-placeholder" }, "active-".concat(row, "-").concat(col)));
|
|
24
|
+
}), _jsx("text", { x: width + textPadding, y: y_center, className: "grid-indicator-text", children: "\u2195 \uAC00\uBCC0" })] }, "active-row-".concat(row)));
|
|
23
25
|
})] }) }));
|
|
24
26
|
}
|
|
@@ -67,7 +67,6 @@ var ReactGridLayout = function (_a) {
|
|
|
67
67
|
var selectedBlock = blockStructure && selectedBlockId
|
|
68
68
|
? findBlockByBlockId(blockStructure, selectedBlockId)
|
|
69
69
|
: null;
|
|
70
|
-
console.log("selectedBlockId:", selectedBlock);
|
|
71
70
|
var editingGroupAllChildren = blockStructure && editingGroupBlock
|
|
72
71
|
? findAllChildrenCbIds(blockStructure, editingGroupBlock).map(function (i) {
|
|
73
72
|
return i.toString();
|