seat-editor 3.6.36 → 3.6.38
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.
|
@@ -148,7 +148,6 @@ export default function GraphView() {
|
|
|
148
148
|
return (_jsx("div", { className: "w-full h-screen flex relative", children: _jsxs("div", { className: "flex", children: [_jsx("div", { className: "absolute top-0 left-0 z-10 flex gap-2", children: priviledged.map((item) => (_jsx(Button, { type: actionPrivileged[item.key] ? "primary" : "default", htmlType: "button", onClick: () => {
|
|
149
149
|
setActionPrivileged((prev) => (Object.assign(Object.assign({}, prev), { [item.key]: !prev[item.key] })));
|
|
150
150
|
}, children: item.name }, item.key))) }), _jsx(LayerView, { componentProps: componentSection, statusKey: "section", defaultBackground: "#1e2d4a", mappingKey: "properties", keyNode: "nodes", onEdgesChange: (edges) => {
|
|
151
|
-
console.log(edges, "edges");
|
|
152
151
|
setEdges(edges);
|
|
153
152
|
}, initialEdges: NODE_PROPERTIES, isConnectEdge: isConnecting, isSelectNode: isSelectNode, connectionMatchKey: {
|
|
154
153
|
key: "use_checking_availability",
|
|
@@ -154,7 +154,6 @@ export default function GraphView() {
|
|
|
154
154
|
</Button>))}
|
|
155
155
|
</div>
|
|
156
156
|
<LayerView componentProps={componentSection} statusKey="section" defaultBackground="#1e2d4a" mappingKey="properties" keyNode="nodes" onEdgesChange={(edges) => {
|
|
157
|
-
console.log(edges, "edges");
|
|
158
157
|
setEdges(edges);
|
|
159
158
|
}} initialEdges={NODE_PROPERTIES} isConnectEdge={isConnecting} isSelectNode={isSelectNode} connectionMatchKey={{
|
|
160
159
|
key: "use_checking_availability",
|
|
@@ -48,7 +48,7 @@ export const useConnectionGraph = ({ svgRef, onEdgesChange, keyNode, mappingKey,
|
|
|
48
48
|
fromPos: connecting.fromPos,
|
|
49
49
|
toPos,
|
|
50
50
|
waypoints: [],
|
|
51
|
-
status: 1
|
|
51
|
+
status: 1,
|
|
52
52
|
},
|
|
53
53
|
];
|
|
54
54
|
});
|
|
@@ -168,12 +168,11 @@ export const useConnectionGraph = ({ svgRef, onEdgesChange, keyNode, mappingKey,
|
|
|
168
168
|
sourceToTargets.set(e.from, []);
|
|
169
169
|
sourceToTargets.get(e.from).push(e.to);
|
|
170
170
|
});
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}, [edges, components]);
|
|
171
|
+
const isNotEqual = !isEqual(edges, initialEdges);
|
|
172
|
+
if (isNotEqual) {
|
|
173
|
+
onEdgesChange === null || onEdgesChange === void 0 ? void 0 : onEdgesChange(edges);
|
|
174
|
+
}
|
|
175
|
+
}, [edges, onEdgesChange]);
|
|
177
176
|
// initialize edges
|
|
178
177
|
useEffect(() => {
|
|
179
178
|
if (!isEqual(initialEdges, edges) && components) {
|
|
@@ -282,6 +281,6 @@ export const useConnectionGraph = ({ svgRef, onEdgesChange, keyNode, mappingKey,
|
|
|
282
281
|
onMouseMove,
|
|
283
282
|
onMouseUp,
|
|
284
283
|
selectNode,
|
|
285
|
-
clearSelectionNode
|
|
284
|
+
clearSelectionNode,
|
|
286
285
|
};
|
|
287
286
|
};
|