tests: add default type to generated nodes

This commit is contained in:
braks
2022-10-08 23:25:34 +02:00
committed by Braks
parent f9cd9051d8
commit 438ad57502
+4
View File
@@ -16,6 +16,7 @@ export function getElements(xElements = 10, yElements = 10) {
if (node.selected) style.border = '1px solid red'
return style
},
type: 'default',
position: { x: x * 100, y: y * 50 },
data: {
randomData: Math.floor(Math.random() * 1e3),
@@ -30,6 +31,9 @@ export function getElements(xElements = 10, yElements = 10) {
data: {
randomData: Math.floor(Math.random() * 1e3),
},
style: (edge) => {
if (edge.selected) return { stroke: '#10b981', strokeWidth: 3 }
},
animated: Math.random() > 0.5,
})
}