There's one major issue: the initial load has incorrect box heights. I have to connect with the driver before things look right.
25UHVUGNT3ANOGCQLL6GG6NNV4SLWLAMPME45JHWLLC2KK4GJO2QC on.code_change = function()print('code changed')A(Input_filename) -- just in case we edited somethingend
{"font":353,"add_thick_line":400,"compute_ntracks":519,"Cursor_node":172,"Input_filename":436,"on.text_input":388,"ntracks":505,"box_height":345,"Surface":434,"compute_layout":385,"line_height":365,"on.code_change":578,"dehtml":456,"Viewport":303,"schema1_of_y":366,"add_node":576,"initialize_editor":338,"on.initialize":446,"to_text":180,"A":474,"load_from_iterator":463,"B":379,"fw_parent":577,"on.draw":418,"fw_app":"mastodon-luaML","on.mouse_press":179,"render_node_and_descendants":577,"scale":7,"vx":5,"y_of_schema1":364,"split_lines":469,"vy":8,"copy_shape":396,"add_edge":575,"render_thread_to_surface":571,"on":1,"on.mouse_release":367,"update_editor_box":430,"on.update":368,"on.keychord_press":391}
render_node_and_descendants = function(nodes, 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 thenadd_node(xlo, y, parent.content, 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/2endlocal parent_surface_node = add_node(parent_xlo, y, parent.content, 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(nodes, child_id, y + parent_height + 50, curr_boundary, curr_boundary + 620*child.ntracks, parent_surface_node)curr_boundary = curr_boundary + 620*child.ntracksendend
{"font":353,"add_thick_line":400,"compute_ntracks":519,"Cursor_node":172,"Input_filename":436,"on.text_input":388,"ntracks":505,"box_height":345,"Surface":434,"compute_layout":385,"line_height":365,"on.code_change":473,"dehtml":456,"Viewport":303,"schema1_of_y":366,"add_node":576,"initialize_editor":338,"on.initialize":446,"to_text":180,"A":474,"load_from_iterator":463,"B":379,"fw_parent":576,"on.draw":418,"fw_app":"mastodon-luaML","on.mouse_press":179,"render_node_and_descendants":577,"scale":7,"vx":5,"y_of_schema1":364,"split_lines":469,"vy":8,"copy_shape":396,"add_edge":575,"render_thread_to_surface":571,"on":1,"on.mouse_release":367,"update_editor_box":430,"on.update":368,"on.keychord_press":391}
{"font":353,"add_thick_line":400,"compute_ntracks":519,"Cursor_node":172,"Input_filename":436,"on.text_input":388,"ntracks":505,"box_height":345,"Surface":434,"compute_layout":385,"line_height":365,"on.code_change":473,"dehtml":456,"Viewport":303,"schema1_of_y":366,"add_node":576,"initialize_editor":338,"on.initialize":446,"to_text":180,"A":474,"load_from_iterator":463,"B":379,"fw_parent":575,"on.draw":418,"fw_app":"mastodon-luaML","on.mouse_press":179,"render_node_and_descendants":565,"scale":7,"vx":5,"y_of_schema1":364,"split_lines":469,"vy":8,"copy_shape":396,"add_edge":575,"render_thread_to_surface":571,"on":1,"on.mouse_release":367,"update_editor_box":430,"on.update":368,"on.keychord_press":391}
add_node = function(x, y, text, parent_surface_node)local surface_node = {x=x, y=y,width=600,type='text',data=split_lines(dehtml(text)),bg={r=0.7,g=0.7, b=1.0},}compute_layout(surface_node, surface_node.x, surface_node.y, Surface)if parent_surface_node thenadd_edge(surface_node, parent_surface_node)endreturn surface_nodeend
{"font":353,"add_thick_line":400,"compute_ntracks":519,"Cursor_node":172,"Input_filename":436,"on.text_input":388,"ntracks":505,"box_height":345,"Surface":434,"compute_layout":385,"line_height":365,"on.code_change":473,"dehtml":456,"Viewport":303,"schema1_of_y":366,"add_node":574,"initialize_editor":338,"on.initialize":446,"to_text":180,"A":474,"load_from_iterator":463,"B":379,"fw_parent":574,"on.draw":418,"fw_app":"mastodon-luaML","on.mouse_press":179,"render_node_and_descendants":565,"scale":7,"vx":5,"y_of_schema1":364,"split_lines":469,"vy":8,"copy_shape":396,"add_edge":575,"render_thread_to_surface":571,"on":1,"on.mouse_release":367,"update_editor_box":430,"on.update":368,"on.keychord_press":391}
add_edge = function(node, parent)local line = {type='line',data={parent.x + 600/2, parent.y + box_height(parent),node.x + 600/2, node.y,},}table.insert(Surface, line)end
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":571,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":573,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":574,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":565,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":573,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
add_node = function(x, y, text, parent_surface_node)local surface_node = {x=x, y=y,width=600,type='text',data=split_lines(dehtml(text)),bg={r=0.7,g=0.7, b=1.0},}compute_layout(surface_node, surface_node.x, surface_node.y, Surface)if parent_surface_node then -- and N_edges > 0 thenadd_edge(surface_node, parent_surface_node)N_edges = N_edges - 1endreturn surface_nodeend
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":571,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":572,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":568,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":565,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":573,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
add_edge = function(node, parent)print('add edge', node.x, node.y, parent.x, parent.y)local line = {type='line',data={parent.x + 600/2, parent.y + box_height(parent),node.x + 600/2, node.y,},}print('add edge 2', line.data[2], line.data[4])table.insert(Surface, line)end
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":571,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":571,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":568,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":565,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":572,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
add_edge = function(node, parent)print('add edge', node.x, node.y, parent.x, parent.y)local line = {type='line',data={parent.x + 600/2, parent.y + box_height(node),node.x + 600/2, node.y,},}print('add edge 2', line.data[2], line.data[4])table.insert(Surface, line)end
render_thread_to_surface = function(thread_data)-- design constraints:-- trees only, no graphs or DAGs-- parents above children-- a child shares its parent's column exactly only if it's an only child-- parents can overlap columns with children and more distant descendants-- siblings never share a column-- siblings never overlap columns-- siblings always occupy the same row-- cousins/aunts/nephews never overlap columnsSurface = {}-- compute mapping from ids to nodeslocal nodes = {} -- id to objectnodes[thread_data.id] = thread_datafor _,x in ipairs(thread_data.descendants) donodes[x.id] = xendlocal root = thread_data-- compute childrenfor _,x in pairs(nodes) doparent_id = x.in_reply_to_idif x.id ~= root.id thenassert(parent_id)local parent = nodes[parent_id]if parent.children == nil thenparent.children = {}endtable.insert(parent.children, x.id)endend-- sort children by timefor _,x in pairs(nodes) doif x.children thentable.sort(x.children)endend-- compute number of tracks neededfor _,x in pairs(nodes) doif x.ntracks == nil thenx.ntracks = compute_ntracks(nodes, x)endend-- prepare the tracks-- each track is 600px + 20px of gutter between nodesN_edges = 2render_node_and_descendants(nodes, root.id, --[[y]] 0, --[[xlo]] 0, --[[xhi]] 620 * root.ntracks)end
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":571,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":570,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":568,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":565,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":558,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
render_thread_to_surface = function(thread_data)-- design constraints:-- trees only, no graphs or DAGs-- parents above children-- a child shares its parent's column exactly only if it's an only child-- parents can overlap columns with children and more distant descendants-- siblings never share a column-- siblings never overlap columns-- siblings always occupy the same row-- cousins/aunts/nephews never overlap columnsSurface = {}-- compute mapping from ids to nodeslocal nodes = {} -- id to objectnodes[thread_data.id] = thread_datafor _,x in ipairs(thread_data.descendants) donodes[x.id] = xendlocal root = thread_data-- compute childrenfor _,x in pairs(nodes) doparent_id = x.in_reply_to_idif x.id ~= root.id thenassert(parent_id)local parent = nodes[parent_id]if parent.children == nil thenparent.children = {}endtable.insert(parent.children, x.id)endend-- sort children by timefor _,x in pairs(nodes) doif x.children thentable.sort(x.children)endend-- compute number of tracks neededfor _,x in pairs(nodes) doif x.ntracks == nil thenx.ntracks = compute_ntracks(nodes, x)endend-- prepare the tracks-- each track is 600px + 20px of gutter between nodesN_edges = 1render_node_and_descendants(nodes, root.id, --[[y]] 0, --[[xlo]] 0, --[[xhi]] 620 * root.ntracks)end
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":570,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":569,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":568,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":565,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":558,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
render_thread_to_surface = function(thread_data)-- design constraints:-- trees only, no graphs or DAGs-- parents above children-- a child shares its parent's column exactly only if it's an only child-- parents can overlap columns with children and more distant descendants-- siblings never share a column-- siblings never overlap columns-- siblings always occupy the same row-- cousins/aunts/nephews never overlap columnsSurface = {}-- compute mapping from ids to nodeslocal nodes = {} -- id to objectnodes[thread_data.id] = thread_datafor _,x in ipairs(thread_data.descendants) donodes[x.id] = xendlocal root = thread_data-- compute childrenfor _,x in pairs(nodes) doparent_id = x.in_reply_to_idif x.id ~= root.id thenassert(parent_id)local parent = nodes[parent_id]if parent.children == nil thenparent.children = {}endtable.insert(parent.children, x.id)endend-- sort children by timefor _,x in pairs(nodes) doif x.children thentable.sort(x.children)endend-- compute number of tracks neededfor _,x in pairs(nodes) doif x.ntracks == nil thenx.ntracks = compute_ntracks(nodes, x)endend-- prepare the tracks-- each track is 600px + 20px of gutter between nodesN_edges = 2render_node_and_descendants(nodes, root.id, --[[y]] 0, --[[xlo]] 0, --[[xhi]] 620 * root.ntracks)end
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":569,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":568,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":568,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":565,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":558,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":567,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":567,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":568,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":565,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":558,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
add_node = function(x, y, text, parent_surface_node)local surface_node = {x=x, y=y,width=600,type='text',data=split_lines(dehtml(text)),bg={r=0.7,g=0.7, b=1.0},}compute_layout(surface_node, surface_node.x, surface_node.y, Surface)if parent_surface_node and N_edges > 0 thenadd_edge(surface_node, parent_surface_node)N_edges = N_edges - 1endreturn surface_nodeend
render_thread_to_surface = function(thread_data)-- design constraints:-- trees only, no graphs or DAGs-- parents above children-- a child shares its parent's column exactly only if it's an only child-- parents can overlap columns with children and more distant descendants-- siblings never share a column-- siblings never overlap columns-- siblings always occupy the same row-- cousins/aunts/nephews never overlap columnsSurface = {}-- compute mapping from ids to nodeslocal nodes = {} -- id to objectnodes[thread_data.id] = thread_datafor _,x in ipairs(thread_data.descendants) donodes[x.id] = xendlocal root = thread_data-- compute childrenfor _,x in pairs(nodes) doparent_id = x.in_reply_to_idif x.id ~= root.id thenassert(parent_id)local parent = nodes[parent_id]if parent.children == nil thenparent.children = {}endtable.insert(parent.children, x.id)endend-- sort children by timefor _,x in pairs(nodes) doif x.children thentable.sort(x.children)endend-- compute number of tracks neededfor _,x in pairs(nodes) doif x.ntracks == nil thenx.ntracks = compute_ntracks(nodes, x)endend-- prepare the tracks-- each track is 600px + 20px of gutter between nodesN_edges = 1render_node_and_descendants(nodes, root.id, --[[y]] 0, --[[xlo]] 0, --[[xhi]] 620 * root.ntracks)end
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":567,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":566,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":563,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":565,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":558,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
render_thread_to_surface = function(thread_data)-- design constraints:-- trees only, no graphs or DAGs-- parents above children-- a child shares its parent's column exactly only if it's an only child-- parents can overlap columns with children and more distant descendants-- siblings never share a column-- siblings never overlap columns-- siblings always occupy the same row-- cousins/aunts/nephews never overlap columnsSurface = {}-- compute mapping from ids to nodeslocal nodes = {} -- id to objectnodes[thread_data.id] = thread_datafor _,x in ipairs(thread_data.descendants) donodes[x.id] = xendlocal root = thread_data-- compute childrenfor _,x in pairs(nodes) doparent_id = x.in_reply_to_idif x.id ~= root.id thenassert(parent_id)local parent = nodes[parent_id]if parent.children == nil thenparent.children = {}endtable.insert(parent.children, x.id)endend-- sort children by timefor _,x in pairs(nodes) doif x.children thentable.sort(x.children)endend-- compute number of tracks neededfor _,x in pairs(nodes) doif x.ntracks == nil thenx.ntracks = compute_ntracks(nodes, x)endend-- prepare the tracks-- each track is 600px + 20px of gutter between nodesrender_node_and_descendants(nodes, root.id, --[[y]] 0, --[[xlo]] 0, --[[xhi]] 620 * root.ntracks)end
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":566,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":565,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":563,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":565,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":558,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
render_node_and_descendants = function(nodes, 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 thenadd_node(xlo, y, parent.content, 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/2endlocal parent_surface_node = add_node(parent_xlo, y, parent.content, grandparent_surface_node)local parent_height = box_height(parent_surface_node)print(id, parent_height)local curr_boundary = xlofor _,child_id in ipairs(parent.children) dolocal child = nodes[child_id]render_node_and_descendants(nodes, child_id, y + parent_height + 50, curr_boundary, curr_boundary + 620*child.ntracks, parent_surface_node)curr_boundary = curr_boundary + 620*child.ntracksendend
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":525,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":564,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":563,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":565,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":558,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
render_node_and_descendants = function(nodes, id, y, xlo, xhi, grandparent_surface_node)-- draw a parent 'id' and its children-- also draw an edge from grandparent to parent if providedprint(id)-- position the root between xlo and xhi to be closer to children with fewer trackslocal parent = nodes[id]if parent.children == nil thenadd_node(xlo, y, parent.content, 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/2endlocal parent_surface_node = add_node(parent_xlo, y, parent.content, grandparent_surface_node)local parent_height = box_height(parent_surface_node)print(id, parent_height)local curr_boundary = xlofor _,child_id in ipairs(parent.children) dolocal child = nodes[child_id]render_node_and_descendants(nodes, child_id, y + parent_height + 50, curr_boundary, curr_boundary + 620*child.ntracks, parent_surface_node)curr_boundary = curr_boundary + 620*child.ntracksendend
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":525,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":563,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":563,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":564,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":558,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":525,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":562,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":563,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":562,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":558,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
add_node = function(x, y, text, parent_surface_node)local surface_node = {x=x, y=y,width=600,type='text',data=split_lines(dehtml(text)),bg={r=0.7,g=0.7, b=1.0},}compute_layout(surface_node, surface_node.x, surface_node.y, Surface)if parent_surface_node thenadd_edge(surface_node, parent_surface_node)endreturn surface_nodeend
render_node_and_descendants = function(nodes, id, y, xlo, xhi, grandparent_surface_node)-- draw a parent 'id' and its children-- also draw an edge from grandparent to parent if providedprint(id)-- position the root between xlo and xhi to be closer to children with fewer trackslocal parent = nodes[id]if parent.children == nil thenadd_node(xlo, y, parent.content, 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/2endlocal parent_surface_node = add_node(parent_xlo, y, parent.content, grandparent_surface_node)local curr_boundary = xlofor _,child_id in ipairs(parent.children) dolocal child = nodes[child_id]render_node_and_descendants(nodes, child_id, y + box_height(parent_surface_node) + 50, curr_boundary, curr_boundary + 620*child.ntracks, parent_surface_node)curr_boundary = curr_boundary + 620*child.ntracksendend
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":525,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":561,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":560,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":562,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":558,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
render_node_and_descendants = function(nodes, id, y, xlo, xhi, grandparent_surface_node)-- draw a parent 'id' and its children-- also draw an edge from grandparent to parent if providedprint(id)-- position the root between xlo and xhi to be closer to children with fewer trackslocal parent = nodes[id]if parent.children == nil or #parent.children <= 1 thenadd_node(xlo, y, parent.content, grandparent_surface_node)returnendlocal 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)local parent_xlo = parent_x - 620/2local parent_surface_node = add_node(parent_xlo, y, parent.content, grandparent_surface_node)local curr_boundary = xlofor _,child_id in ipairs(parent.children) dolocal child = nodes[child_id]render_node_and_descendants(nodes, child_id, y + box_height(parent_surface_node) + 50, curr_boundary, curr_boundary + 620*child.ntracks, parent_surface_node)curr_boundary = curr_boundary + 620*child.ntracksendend
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":525,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":560,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":560,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":561,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":558,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":525,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":559,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":560,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":554,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":558,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
add_node = function(x, y, text, parent_surface_node)print('add node', x)local surface_node = {x=x, y=y,width=600,type='text',data=split_lines(dehtml(text)),bg={r=0.7,g=0.7, b=1.0},}print('aa 1', surface_node.x)compute_layout(surface_node, surface_node.x, surface_node.y, Surface)print('aa 2', surface_node.x)if parent_surface_node thenprint('aa', surface_node.x, parent_surface_node.x)add_edge(surface_node, parent_surface_node)endreturn surface_nodeend
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":525,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":558,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":559,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":554,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":558,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
add_node = function(x, y, text, parent_surface_node)print('add node', x)local surface_node = {x=x, y=y,width=600,type='text',data=split_lines(dehtml(text)),bg={r=0.7,g=0.7, b=1.0},}compute_layout(surface_node, surface_node.x, surface_node.y, Surface)if parent_surface_node thenprint('aa', surface_node.x, parent_surface_node.x)add_edge(surface_node, parent_surface_node)endreturn surface_nodeend
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":525,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":557,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":557,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":554,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":558,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
add_edge = function(node, parent)print('add edge', node.x, node.y, parent.x, parent.y)local line = {type='line',data={parent.x + 600/2, parent.y + box_height(node),node.x + 600/2, node.y,},}table.insert(Surface, line)end
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":525,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":556,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":557,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":554,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":556,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
add_node = function(x, y, text, parent_surface_node)local surface_node = {x=x, y=y,width=600,type='text',data=split_lines(dehtml(text)),bg={r=0.7,g=0.7, b=1.0},}compute_layout(surface_node, surface_node.x, surface_node.y, Surface)if parent_surface_node thenadd_edge(surface_node, parent_surface_node)endreturn surface_nodeend
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":525,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":555,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":555,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":554,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":556,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
add_edge = function(node, parent)print('add edge', node.id, parent.id)local line = {type='line',data={parent.x + 600/2, parent.y + box_height(node),node.x + 600/2, node.y,},}table.insert(Surface, line)end
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":525,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":554,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":555,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":554,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":551,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
add_node = function(x, y, text, parent_surface_node)print('add node')local surface_node = {x=x, y=y,width=600,type='text',data=split_lines(dehtml(text)),bg={r=0.7,g=0.7, b=1.0},}compute_layout(surface_node, surface_node.x, surface_node.y, Surface)if parent_surface_node thenadd_edge(surface_node, parent_surface_node)endreturn surface_nodeend
render_node_and_descendants = function(nodes, id, y, xlo, xhi, grandparent_surface_node)-- draw a parent 'id' and its children-- also draw an edge from grandparent to parent if providedprint(id)-- position the root between xlo and xhi to be closer to children with fewer trackslocal parent = nodes[id]if parent.children == nil thenadd_node(xlo, y, parent.content, grandparent_surface_node)returnendlocal 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)local parent_xlo = parent_x - 620/2local parent_surface_node = add_node(parent_xlo, y, parent.content, grandparent_surface_node)local curr_boundary = xlofor _,child_id in ipairs(parent.children) dolocal child = nodes[child_id]render_node_and_descendants(nodes, child_id, y + box_height(parent_surface_node) + 50, curr_boundary, curr_boundary + 620*child.ntracks, parent_surface_node)curr_boundary = curr_boundary + 620*child.ntracksendend
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":525,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":553,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":552,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":554,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":551,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
render_node_and_descendants = function(nodes, id, y, xlo, xhi, grandparent_surface_node)-- draw a parent 'id' and its children-- also draw an edge from grandparent to parent if providedprint(id)-- position the root between xlo and xhi to be closer to children with fewer trackslocal parent = nodes[id]if parent.children == nil thenadd_node(xlo, y, parent.content, grandparent_surface_node)returnendlocal 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)local parent_xlo = parent_x - 620/2local parent_surface_node = add_node(parent_xlo, y, parent.content, grandparent)local curr_boundary = xlofor _,child_id in ipairs(parent.children) dolocal child = nodes[child_id]render_node_and_descendants(nodes, child_id, y + box_height(parent_surface_node) + 50, curr_boundary, curr_boundary + 620*child.ntracks, parent_surface_node)curr_boundary = curr_boundary + 620*child.ntracksendend
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":525,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":552,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":552,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":553,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":551,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":525,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":551,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":552,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":547,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":551,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
add_node = function(x, y, text, parent)print('add node')local surface_node = {x=x, y=y,width=600,type='text',data=split_lines(dehtml(text)),bg={r=0.7,g=0.7, b=1.0},}compute_layout(surface_node, surface_node.x, surface_node.y, Surface)if parent thenadd_edge(node, parent)endreturn surface_nodeend
{"on.mouse_release":367,"on.update":368,"Cursor_node":172,"on.keychord_press":391,"on":1,"on.text_input":388,"render_thread_to_surface":525,"dehtml":456,"add_thick_line":400,"to_text":180,"copy_shape":396,"fw_parent":550,"fw_app":"mastodon-luaML","initialize_editor":338,"line_height":365,"update_editor_box":430,"compute_layout":385,"on.code_change":473,"box_height":345,"load_from_iterator":463,"schema1_of_y":366,"split_lines":469,"A":474,"add_node":550,"font":353,"on.initialize":446,"ntracks":505,"render_node_and_descendants":547,"compute_ntracks":519,"Input_filename":436,"Viewport":303,"B":379,"Surface":434,"vy":8,"scale":7,"add_edge":551,"y_of_schema1":364,"on.draw":418,"on.mouse_press":179,"vx":5}
add_edge = function(node, parent)print('add edge')local line = {type='line',data={parent.x + 600/2, parent.y + box_height(node),node.x + 600/2, node.y,},}table.insert(Surface, line)end
{"schema1_of_y":366,"on.keychord_press":391,"split_lines":469,"fw_parent":549,"y_of_schema1":364,"fw_app":"mastodon-luaML","add_node":550,"render_node_and_descendants":547,"Input_filename":436,"Cursor_node":172,"compute_layout":385,"add_edge":548,"to_text":180,"scale":7,"initialize_editor":338,"on.text_input":388,"ntracks":505,"copy_shape":396,"compute_ntracks":519,"render_thread_to_surface":525,"line_height":365,"Surface":434,"add_thick_line":400,"dehtml":456,"on.draw":418,"on":1,"vx":5,"B":379,"Viewport":303,"update_editor_box":430,"on.mouse_press":179,"vy":8,"font":353,"A":474,"on.initialize":446,"load_from_iterator":463,"box_height":345,"on.mouse_release":367,"on.code_change":473,"on.update":368}
add_node = function(x, y, text, parent)local surface_node = {x=x, y=y,width=600,type='text',data=split_lines(dehtml(text)),bg={r=0.7,g=0.7, b=1.0},}compute_layout(surface_node, surface_node.x, surface_node.y, Surface)if parent thenadd_edge(node, parent)endreturn surface_nodeend
{"schema1_of_y":366,"on.keychord_press":391,"split_lines":469,"fw_parent":548,"y_of_schema1":364,"fw_app":"mastodon-luaML","add_node":549,"render_node_and_descendants":547,"Input_filename":436,"Cursor_node":172,"compute_layout":385,"add_edge":548,"to_text":180,"scale":7,"initialize_editor":338,"on.text_input":388,"ntracks":505,"copy_shape":396,"compute_ntracks":519,"render_thread_to_surface":525,"line_height":365,"Surface":434,"add_thick_line":400,"dehtml":456,"on.draw":418,"on":1,"vx":5,"B":379,"Viewport":303,"update_editor_box":430,"on.mouse_press":179,"vy":8,"font":353,"A":474,"on.initialize":446,"load_from_iterator":463,"box_height":345,"on.mouse_release":367,"on.code_change":473,"on.update":368}
add_node = function(x, y, text, parent)local surface_node = {x=x, y=y,width=600,type='text',data=split_lines(dehtml(text)),bg={r=0.7,g=0.7, b=1.0},}compute_layout(surface_node, surface_node.x, surface_node.y, Surface)add_edge(node, parent)return surface_nodeend
{"schema1_of_y":366,"on.keychord_press":391,"split_lines":469,"fw_parent":547,"y_of_schema1":364,"fw_app":"mastodon-luaML","add_node":546,"render_node_and_descendants":547,"Input_filename":436,"Cursor_node":172,"compute_layout":385,"add_edge":548,"to_text":180,"scale":7,"initialize_editor":338,"on.text_input":388,"ntracks":505,"copy_shape":396,"compute_ntracks":519,"render_thread_to_surface":525,"line_height":365,"Surface":434,"add_thick_line":400,"dehtml":456,"on.draw":418,"on":1,"vx":5,"B":379,"Viewport":303,"update_editor_box":430,"on.mouse_press":179,"vy":8,"font":353,"A":474,"on.initialize":446,"load_from_iterator":463,"box_height":345,"on.mouse_release":367,"on.code_change":473,"on.update":368}
add_edge = function(node, parent)local line = {type='line',data={parent.x + 600/2, parent.y + box_height(node),node.x + 600/2, node.y,},}table.insert(Surface, line)end
render_node_and_descendants = function(nodes, id, y, xlo, xhi, grandparent)-- draw a parent 'id' and its children-- also draw an edge from grandparent to parent if providedprint(id)-- position the root between xlo and xhi to be closer to children with fewer trackslocal parent = nodes[id]if parent.children == nil thenadd_node(xlo, y, parent.content, grandparent)returnendlocal 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)local parent_xlo = parent_x - 620/2local parent_surface_node = add_node(parent_xlo, y, parent.content, grandparent)local curr_boundary = xlofor _,child_id in ipairs(parent.children) dolocal child = nodes[child_id]render_node_and_descendants(nodes, child_id, y + box_height(parent_surface_node) + 50, curr_boundary, curr_boundary + 620*child.ntracks)curr_boundary = curr_boundary + 620*child.ntracksendend
{"schema1_of_y":366,"on.keychord_press":391,"split_lines":469,"fw_parent":546,"y_of_schema1":364,"fw_app":"mastodon-luaML","add_node":546,"render_node_and_descendants":547,"Input_filename":436,"Cursor_node":172,"compute_layout":385,"to_text":180,"scale":7,"initialize_editor":338,"on.text_input":388,"ntracks":505,"copy_shape":396,"compute_ntracks":519,"render_thread_to_surface":525,"line_height":365,"Surface":434,"add_thick_line":400,"dehtml":456,"on.draw":418,"on":1,"vx":5,"B":379,"Viewport":303,"update_editor_box":430,"on.mouse_press":179,"vy":8,"font":353,"A":474,"on.initialize":446,"load_from_iterator":463,"box_height":345,"on.mouse_release":367,"on.code_change":473,"on.update":368}
{"schema1_of_y":366,"on.keychord_press":391,"split_lines":469,"fw_parent":545,"y_of_schema1":364,"fw_app":"mastodon-luaML","add_node":546,"render_node_and_descendants":545,"Input_filename":436,"Cursor_node":172,"compute_layout":385,"to_text":180,"scale":7,"initialize_editor":338,"on.text_input":388,"ntracks":505,"copy_shape":396,"compute_ntracks":519,"render_thread_to_surface":525,"line_height":365,"Surface":434,"add_thick_line":400,"dehtml":456,"on.draw":418,"on":1,"vx":5,"B":379,"Viewport":303,"update_editor_box":430,"on.mouse_press":179,"vy":8,"font":353,"A":474,"on.initialize":446,"load_from_iterator":463,"box_height":345,"on.mouse_release":367,"on.code_change":473,"on.update":368}
add_node = function(x, y, text, grandparent)local surface_node = {x=x, y=y,width=600,type='text',data=split_lines(dehtml(text)),bg={r=0.7,g=0.7, b=1.0},}compute_layout(surface_node, surface_node.x, surface_node.y, Surface)return surface_nodeend