mirror of
https://github.com/rm-code/Graphoon.git
synced 2024-11-16 18:24:22 +00:00
Return new node when using graph:addNode
This commit is contained in:
parent
4bf0d0473d
commit
f5931d5ce8
@ -75,6 +75,7 @@ function Graph.new()
|
|||||||
function self:addNode( id, name, x, y )
|
function self:addNode( id, name, x, y )
|
||||||
assert( not nodes[id], "Node IDs must be unique." );
|
assert( not nodes[id], "Node IDs must be unique." );
|
||||||
nodes[id] = Node.new( id, name, x, y );
|
nodes[id] = Node.new( id, name, x, y );
|
||||||
|
return nodes[id];
|
||||||
end
|
end
|
||||||
|
|
||||||
---
|
---
|
||||||
|
Loading…
Reference in New Issue
Block a user