refactor(nodes): Remove position func

* it's not improving on existing methods, i.e. no real benefit to it
This commit is contained in:
Braks
2022-04-11 11:30:10 +02:00
parent b206ff160f
commit c964fb6b7d
2 changed files with 1 additions and 13 deletions
-5
View File
@@ -103,12 +103,7 @@ const createGraphNodes = (nodes: Node[], getNode: Getters['getNode'], currGraphN
if (node.parentNode && !nextNodes.find((n) => n.id === node.parentNode)) {
console.warn(`[vueflow]: Parent node ${node.parentNode} not found`)
}
const position =
(<any>node).position instanceof Function
? (<any>node).position(node, currGraphNodes, node.parentNode ? getNode(node.parentNode) : undefined)
: node.position
if (position) node.position = position
if (node.parentNode || parentNodes[node.id]) {
if (parentNodes[node.id]) {
node.isParent = true