5QTU3ODSGFLRWALAUDR27QYRB6UVDZD3Y3UJMZXISEFA7TRDI6BAC render_node_and_descendants = function(id, y, xlo, xhi, grandparent_surface_node)-- draw a parent 'id' and its children-- also draw an edge from grandparent to parent if provided-- position the root between xlo and xhi to be closer to children with fewer trackslocal parent = Nodes[id]if parent.children == nil thenparent.surface_node = add_node(xlo, y, parent.content, parent.id, grandparent_surface_node)returnendlocal parent_xloif #parent.children <= 1 thenparent_xlo = xloelselocal total_boundaries = 0local curr_boundary = xlofor child_idx = 1,#parent.children-1 dolocal child_id = parent.children[child_idx]local child = Nodes[child_id]curr_boundary = curr_boundary + 620 * child.ntrackstotal_boundaries = total_boundaries + curr_boundaryendlocal parent_x = total_boundaries / (#parent.children-1)parent_xlo = parent_x - 620/2endparent.surface_node = add_node(parent_xlo, y, parent.content, parent.id, grandparent_surface_node)local parent_height = box_height(parent.surface_node)local curr_boundary = xlofor _,child_id in ipairs(parent.children) dolocal child = Nodes[child_id]render_node_and_descendants(child_id, y + parent_height + 50, curr_boundary, curr_boundary + 620*child.ntracks, parent.surface_node)curr_boundary = curr_boundary + 620*child.ntracksendend
{"render_node_and_descendants":633,"compute_layout":619,"schema1_of_y":366,"render_thread_to_surface":626,"y_of_schema1":364,"dehtml":456,"Surface":588,"line_height":365,"on.draw":632,"load_from_iterator":463,"box_height":345,"on":1,"Viewport":303,"vx":5,"update_editor_box":430,"on.keychord_press":631,"Input_filename":436,"on.mouse_press":618,"add_thick_line":400,"on.mouse_release":586,"on.initialize":446,"on.text_input":587,"on.code_change":578,"fw_app":"mastodon-luaML","compute_ntracks":598,"Cursor_node":172,"fw_parent":632,"add_edge":575,"Nodes":593,"split_lines":469,"A":582,"to_text":180,"vy":8,"copy_shape":396,"scale":7,"add_node":590,"ntracks":600,"B":379,"initialize_editor":338,"on.update":368,"to_node":611,"font":353}
on.draw = function()love.graphics.setColor(1,0,0)for _,obj in ipairs(Surface) dolove.graphics.setColor(obj.r or 0, obj.g or 0, obj.b or 0)if obj.type == 'rectangle' thenif obj.text_node and obj.text_node == Cursor_node.surface_node thenlove.graphics.setColor(0.7, 0.7, 0, 0.4)endlove.graphics.rectangle(obj.drawmode or 'fill', vx(obj.x),vy(obj.y), scale(obj.w),scale(obj.h))elseif obj.type == 'line' thenlove.graphics.line(unpack(obj.zdata))elseif obj.type == 'circle' thenlove.graphics.circle(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radius))elseif obj.type == 'arc' thenlove.graphics.arc(obj.drawmode or 'line', obj.arctype or 'open', vx(obj.x), vy(obj.y), scale(obj.radius), obj.angle1, obj.angle2, obj.segments)elseif obj.type == 'ellipse' thenlove.graphics.ellipse(obj.drawmode or 'fill', vx(obj.x), vy(obj.y), scale(obj.radiusx), scale(obj.radiusy))elseif obj.type == 'bezier' thenlove.graphics.line(unpack(obj.zdata))elseif obj.type == 'text' thenif obj.w == nil thenlove.graphics.draw(obj.text, vx(obj.x), vy(obj.y))elseedit.draw(obj.editor, obj.fg or {r=0,g=0,b=0}, not obj.show_cursor)endendendend
{"render_node_and_descendants":614,"compute_layout":619,"schema1_of_y":366,"render_thread_to_surface":626,"y_of_schema1":364,"dehtml":456,"Surface":588,"line_height":365,"on.draw":632,"load_from_iterator":463,"box_height":345,"on":1,"Viewport":303,"vx":5,"update_editor_box":430,"on.keychord_press":631,"Input_filename":436,"on.mouse_press":618,"add_thick_line":400,"on.mouse_release":586,"on.initialize":446,"on.text_input":587,"on.code_change":578,"fw_app":"mastodon-luaML","compute_ntracks":598,"Cursor_node":172,"fw_parent":631,"add_edge":575,"Nodes":593,"split_lines":469,"A":582,"to_text":180,"vy":8,"copy_shape":396,"scale":7,"add_node":590,"ntracks":600,"B":379,"initialize_editor":338,"on.update":368,"to_node":611,"font":353}