Commit 9ba27715 authored by Michael Vrána's avatar Michael Vrána

ParamNode error highlight fix

parent 40c2e32e
Pipeline #80401 passed with stages
in 10 minutes and 4 seconds
......@@ -25,10 +25,11 @@ const ParamNodeContainer = (props: ParamNodeContainerProps) => {
const { edges, ghostEdge, buildEdge, hasError, cursorMode } = useSelector(
(state: ReduxState) => {
const edges = state.algorithmData.present.edges.filter(
(edge) =>
edge.startNodeId === nodeId ||
(edge.endNodeId === nodeId &&
edge.endParamIndex === paramIndex)
isOutput
? (edge) => edge.startNodeId === nodeId
: (edge) =>
edge.endNodeId === nodeId &&
edge.endParamIndex === paramIndex
)
return {
......@@ -36,7 +37,9 @@ const ParamNodeContainer = (props: ParamNodeContainerProps) => {
ghostEdge: state.algorithmUI.ghostEdge,
buildEdge: state.algorithmCanvas.buildEdge,
hasError: edges.some((edge) =>
state.algorithmData.present.incompatibleEdges.some(({ id }) => id === edge.id)
state.algorithmData.present.incompatibleEdges.some(
({ id }) => id === edge.id
)
),
cursorMode: state.algorithmCanvas.cursorMode
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment