feat(docs): add useLayout composable

This commit is contained in:
braks
2024-02-08 22:39:01 +01:00
committed by Braks
parent a0abe3af9d
commit ce7333fef6
6 changed files with 91 additions and 55 deletions
+5 -1
View File
@@ -21,7 +21,11 @@ function generatePossibleEdges(nodes) {
return possibleEdges
}
// Function to create a new shuffled edges array
/**
* Composable that returns a function to shuffle the edges of a graph
*
* @returns {Function} A function that takes a list of nodes and returns a list of edges
*/
export function useShuffle() {
return (nodes) => {
const possibleEdges = generatePossibleEdges(nodes)