seat-editor 3.6.30 → 3.6.32
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.
|
@@ -53,7 +53,6 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
|
|
|
53
53
|
}
|
|
54
54
|
return true;
|
|
55
55
|
}), [renderedElements, connectionMatchKey]);
|
|
56
|
-
console.log("tableMatchConnectionKey", tableMatchConnectionKey);
|
|
57
56
|
const nodeHighlightMap = useMemo(() => {
|
|
58
57
|
if (!selectedEdge)
|
|
59
58
|
return new Map();
|
|
@@ -153,7 +152,6 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
|
|
|
153
152
|
const rotation = (_c = node.rotation) !== null && _c !== void 0 ? _c : 0;
|
|
154
153
|
const color = getLevelColor(level);
|
|
155
154
|
const padding = 4;
|
|
156
|
-
// console.log("nodeHighlightMapByNode", nodeId, level, color);
|
|
157
155
|
if (level > 1)
|
|
158
156
|
return null;
|
|
159
157
|
return (_jsxs("g", { transform: `translate(${node.x}, ${node.y}) rotate(${rotation})`, style: { pointerEvents: "none" }, children: [_jsx("rect", { x: -w / 2 - padding, y: -h / 2 - padding, width: w + padding * 2, height: h + padding * 2, fill: "none", stroke: color, strokeWidth: 8, rx: 5, opacity: 0.08 }), _jsx("rect", { x: -w / 2 - padding, y: -h / 2 - padding, width: w + padding * 2, height: h + padding * 2, fill: "none", stroke: color, strokeWidth: level === 0 ? 2.5 : 1.5,
|
|
@@ -167,7 +165,7 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
|
|
|
167
165
|
const { pathD, allPoints, fromPos, toPos, midX, midY } = ep;
|
|
168
166
|
const isSel = selectedEdge === edge.id;
|
|
169
167
|
const isHov = hoveredEdge === edge.id;
|
|
170
|
-
const connectionMatch = tableMatchConnectionKey === null || tableMatchConnectionKey === void 0 ? void 0 : tableMatchConnectionKey.some((el) => el.id === edge.to || el.id === edge.from);
|
|
168
|
+
const connectionMatch = tableMatchConnectionKey === null || tableMatchConnectionKey === void 0 ? void 0 : tableMatchConnectionKey.some((el) => { var _a, _b; return ((_a = el === null || el === void 0 ? void 0 : el[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _a !== void 0 ? _a : el.id) === edge.to || ((_b = el === null || el === void 0 ? void 0 : el[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _b !== void 0 ? _b : el.id) === edge.from; });
|
|
171
169
|
// const fromLevel = nodeHighlightMap.get(edge.from);
|
|
172
170
|
// const toLevel = nodeHighlightMap.get(edge.to);
|
|
173
171
|
const isStillConnectingProcess = (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) === edge.from || (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) === edge.to;
|
|
@@ -52,7 +52,6 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
|
|
|
52
52
|
}
|
|
53
53
|
return true;
|
|
54
54
|
}), [renderedElements, connectionMatchKey]);
|
|
55
|
-
console.log("tableMatchConnectionKey", tableMatchConnectionKey);
|
|
56
55
|
const nodeHighlightMap = useMemo(() => {
|
|
57
56
|
if (!selectedEdge)
|
|
58
57
|
return new Map();
|
|
@@ -178,7 +177,6 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
|
|
|
178
177
|
const rotation = (_c = node.rotation) !== null && _c !== void 0 ? _c : 0;
|
|
179
178
|
const color = getLevelColor(level);
|
|
180
179
|
const padding = 4;
|
|
181
|
-
// console.log("nodeHighlightMapByNode", nodeId, level, color);
|
|
182
180
|
if (level > 1)
|
|
183
181
|
return null;
|
|
184
182
|
return (<g key={`highlight-${nodeId}`} transform={`translate(${node.x}, ${node.y}) rotate(${rotation})`} style={{ pointerEvents: "none" }}>
|
|
@@ -212,7 +210,7 @@ export const ConnectionLayer = ({ edges, selectedEdge, connecting, draggingAncho
|
|
|
212
210
|
const { pathD, allPoints, fromPos, toPos, midX, midY } = ep;
|
|
213
211
|
const isSel = selectedEdge === edge.id;
|
|
214
212
|
const isHov = hoveredEdge === edge.id;
|
|
215
|
-
const connectionMatch = tableMatchConnectionKey === null || tableMatchConnectionKey === void 0 ? void 0 : tableMatchConnectionKey.some((el) => el.id === edge.to || el.id === edge.from);
|
|
213
|
+
const connectionMatch = tableMatchConnectionKey === null || tableMatchConnectionKey === void 0 ? void 0 : tableMatchConnectionKey.some((el) => { var _a, _b; return ((_a = el === null || el === void 0 ? void 0 : el[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _a !== void 0 ? _a : el.id) === edge.to || ((_b = el === null || el === void 0 ? void 0 : el[groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.dataKey]) !== null && _b !== void 0 ? _b : el.id) === edge.from; });
|
|
216
214
|
// const fromLevel = nodeHighlightMap.get(edge.from);
|
|
217
215
|
// const toLevel = nodeHighlightMap.get(edge.to);
|
|
218
216
|
const isStillConnectingProcess = (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) === edge.from || (connecting === null || connecting === void 0 ? void 0 : connecting.fromId) === edge.to;
|
|
@@ -110,10 +110,8 @@ export const renderElements = (elementEditor, mappingKey, tableMatchKey, connect
|
|
|
110
110
|
finalProps = Object.assign(Object.assign(Object.assign({}, finalProps), tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.properties), { fill: fill, stroke, className: tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.className, element: tableMatch === null || tableMatch === void 0 ? void 0 : tableMatch.element });
|
|
111
111
|
}
|
|
112
112
|
if (connectionMatchKey) {
|
|
113
|
-
console.log("finalProps?.[connectionMatchKey.key]", finalProps, finalProps === null || finalProps === void 0 ? void 0 : finalProps[connectionMatchKey.key]);
|
|
114
113
|
if (!(finalProps === null || finalProps === void 0 ? void 0 : finalProps[connectionMatchKey.key])) {
|
|
115
114
|
finalProps = Object.assign(Object.assign({}, finalProps), { [connectionMatchKey.key]: editorItem === null || editorItem === void 0 ? void 0 : editorItem[connectionMatchKey.key] });
|
|
116
|
-
console.log("finalProps?.[connectionMatchKey.key]", finalProps, finalProps === null || finalProps === void 0 ? void 0 : finalProps[connectionMatchKey.key]);
|
|
117
115
|
}
|
|
118
116
|
}
|
|
119
117
|
return finalProps;
|