Added stroke fix on Paste and Add Flow
This commit is contained in:
parent
6f80c7a6c2
commit
6ac4e427ee
1 changed files with 12 additions and 3 deletions
|
|
@ -278,7 +278,12 @@ export function TabsProvider({ children }: { children: ReactNode }) {
|
||||||
sourceHandle,
|
sourceHandle,
|
||||||
targetHandle,
|
targetHandle,
|
||||||
id,
|
id,
|
||||||
className: "animate-pulse",
|
style: { stroke: "inherit" },
|
||||||
|
className:
|
||||||
|
targetHandle.split("|")[0] === "Text"
|
||||||
|
? "stroke-gray-800 dark:stroke-gray-300"
|
||||||
|
: "stroke-gray-900 dark:stroke-gray-200",
|
||||||
|
animated: targetHandle.split("|")[0] === "Text",
|
||||||
selected: false,
|
selected: false,
|
||||||
},
|
},
|
||||||
edges.map((e) => ({ ...e, selected: false }))
|
edges.map((e) => ({ ...e, selected: false }))
|
||||||
|
|
@ -294,8 +299,12 @@ export function TabsProvider({ children }: { children: ReactNode }) {
|
||||||
const description = flow?.description ? flow.description : "";
|
const description = flow?.description ? flow.description : "";
|
||||||
if (data) {
|
if (data) {
|
||||||
data.edges.forEach((edge) => {
|
data.edges.forEach((edge) => {
|
||||||
edge.className = "";
|
edge.style = { stroke: "inherit" };
|
||||||
edge.style = { stroke: "#555555" };
|
edge.className =
|
||||||
|
edge.targetHandle.split("|")[0] === "Text"
|
||||||
|
? "stroke-gray-800 dark:stroke-gray-300"
|
||||||
|
: "stroke-gray-900 dark:stroke-gray-200";
|
||||||
|
edge.animated = edge.targetHandle.split("|")[0] === "Text";
|
||||||
});
|
});
|
||||||
data.nodes.forEach((node) => {
|
data.nodes.forEach((node) => {
|
||||||
if (Object.keys(templates[node.data.type]["template"]).length > 0) {
|
if (Object.keys(templates[node.data.type]["template"]).length > 0) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue