snap.love/0028-A

19 lines
572 B
Plaintext

A = function()
love.graphics.setFont(love.graphics.newFont(scale(20))) -- editor objects implicitly depend on current font
-- translate Nodes to Surface
Surface = {}
for key,node in pairs(Nodes) do
node.id = key
compute_layout(node, node.x,node.y, Surface, skip_updating_screen_top_for)
end
-- draw edges after all nodes have been initialized
for key,node in pairs(Nodes) do
for _,d in ipairs(node.outgoing_edges) do
compute_layout_for_edge(key, d)
end
end
-- continue the pipeline
B()
-- TODO: ugly that we're manipulating editor objects twice
end