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