16 lines
421 B
Plaintext
16 lines
421 B
Plaintext
A1 = function(key)
|
|
-- like A, but updating a single node
|
|
-- this only works because Nodes is a flat array; we don't support row/col types here yet
|
|
-- delete previously added shapes for this node:
|
|
for i=#Surface,1,-1 do
|
|
local x = Surface[i]
|
|
if x.key == key then
|
|
table.remove(Surface, i)
|
|
end
|
|
end
|
|
local node = Definitions[key]
|
|
compute_layout(node, node.x,node.y, Surface)
|
|
-- continue the pipeline
|
|
B()
|
|
end
|