Remove unused revertAllVerticesToBuild function
This commit is contained in:
parent
91ff2ce3df
commit
6d48479066
2 changed files with 1 additions and 13 deletions
|
|
@ -416,7 +416,6 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
|
|||
useFlowStore.getState().updateBuildStatus(idList, BuildStatus.BUILDING);
|
||||
},
|
||||
});
|
||||
get().revertAllVerticesToBuild();
|
||||
},
|
||||
getFlow: () => {
|
||||
return {
|
||||
|
|
@ -429,17 +428,7 @@ const useFlowStore = create<FlowStoreType>((set, get) => ({
|
|||
set({ verticesBuild: vertices });
|
||||
},
|
||||
verticesBuild: [],
|
||||
revertAllVerticesToBuild: () => {
|
||||
// set all vertices to TO_BUILD
|
||||
let verticesIds: string[] = [];
|
||||
Object.keys(get().buildStatus).forEach((id) => {
|
||||
if (get().buildStatus[id] !== BuildStatus.TO_BUILD) {
|
||||
verticesIds.push(id);
|
||||
}
|
||||
});
|
||||
get().updateBuildStatus(verticesIds, BuildStatus.TO_BUILD);
|
||||
// additional code logic here
|
||||
},
|
||||
|
||||
removeFromVerticesBuild: (vertices: string[]) => {
|
||||
set({
|
||||
verticesBuild: get().verticesBuild.filter(
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ export type FlowStoreType = {
|
|||
getFlow: () => { nodes: Node[]; edges: Edge[]; viewport: Viewport };
|
||||
updateVerticesBuild: (vertices: string[]) => void;
|
||||
removeFromVerticesBuild: (vertices: string[]) => void;
|
||||
revertAllVerticesToBuild: () => void;
|
||||
verticesBuild: string[];
|
||||
updateBuildStatus: (nodeId: string[], status: BuildStatus) => void;
|
||||
buildStatus: { [key: string]: BuildStatus };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue