removed animated dash edge for text

This commit is contained in:
anovazzi1 2024-02-06 14:21:56 -03:00
commit cdbc516b85
2 changed files with 2 additions and 13 deletions

View file

@ -261,11 +261,7 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
id, id,
data: cloneDeep(edge.data), data: cloneDeep(edge.data),
style: { stroke: "#555" }, style: { stroke: "#555" },
className: className: "stroke-gray-900 ",
targetHandleObject.type === "Text"
? "stroke-gray-800 "
: "stroke-gray-900 ",
animated: targetHandleObject.type === "Text",
selected: false, selected: false,
}, },
newEdges.map((edge) => ({ ...edge, selected: false })) newEdges.map((edge) => ({ ...edge, selected: false }))
@ -329,9 +325,6 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
.type === "Text" .type === "Text"
? "stroke-foreground " ? "stroke-foreground "
: "stroke-foreground ") + " stroke-connection", : "stroke-foreground ") + " stroke-connection",
animated:
(scapeJSONParse(connection.targetHandle!) as targetHandleType)
.type === "Text",
markerEnd: isIoIn || isIoOut ? { ...commonMarkerProps } : undefined, markerEnd: isIoIn || isIoOut ? { ...commonMarkerProps } : undefined,
}, },
oldEdges oldEdges

View file

@ -324,11 +324,7 @@ export function updateEdges(edges: Edge[]) {
const targetHandleObject: targetHandleType = scapeJSONParse( const targetHandleObject: targetHandleType = scapeJSONParse(
edge.targetHandle! edge.targetHandle!
); );
edge.className = edge.className = "stroke-gray-900 stroke-connection";
(targetHandleObject.type === "Text"
? "stroke-gray-800 "
: "stroke-gray-900 ") + " stroke-connection";
edge.animated = targetHandleObject.type === "Text";
}); });
} }