A node will take up as much vertical space as it needs given its text. But we can resize its width.
SMZJGK56DYOP2CYIYDV3QXVHL5P52IEF34GFBESNMULJDMDLJR2AC JNS2ATVJRXCIBGRFRPPN63OAOQRVV7GE2VRAL3T6YNRXFX6YYMQAC R5QXEHUIZLELJGGCZAE7ATNS3CLRJ7JFRENMGH4XXH24C5WABZDQC ZUXG2RU4WF5WF7EYU2XQJ6AERLJLOMGDEXWRMGWHT5DR3B7X7MWQC J62CVGNGJZSN7TMTE2SG53O47YG4SJGJFTUFKVOZY4TM4KAC566QC T7T66GEUFLP3YHZN5UNOVBYK33KISJWJQKCPZU6MQH45KSU7CZZQC YUQ4YINAT5YTK3CAY4VK3HSYQ4D63FXLLPMC4R3DUFHIZIUQO7WQC UJ2RZ43LIVRIBWIXHXMLIQIQTL32VVEN4CVU7PEBTITQFPO4EXXQC on_resize = function(sx,sy)for _,node in ipairs(Nodes) doif sx >= node.x+node.w+20 and sx < node.x+node.w+24 thenlocal buffer_height = math.max(node.h, 3*node.editor.line_height)if sy >= node.y and sy < node.y+buffer_height thenreturn trueendendendend
on_move_bar = function(sx,sy)for _,node in ipairs(Nodes) doif sx >= node.x-10 and sx < node.x-10+node.w/2 thenif sy >= node.y - 40 and sy < node.y-20 thenreturn trueendendendend
sy = function(vy)return vy/Viewport.zoom + Viewport.yend
sx = function(vx)return vx/Viewport.zoom + Viewport.xend
set_mouse_cursor = function(name)if Mouse_cursor ~= name thenMouse_cursor = namelove.mouse.setCursor(love.mouse.getSystemCursor(name))endend
-- render background if necessarylocal node_to_renderif node.bg thennode_to_render = {type='rectangle', drawmode='line', r=0.5, g=0.5, b=0.5, x=node.x-10, y=node.y-10, corner_radius=5}table.insert(nodes_to_render, node_to_render)end
-- render a bar to grab for moving the nodelocal move_bar = {type='rectangle', r=0.5,g=0.5,b=0.5, x=node.x-10, y=node.y-10-10-4, h=4}table.insert(nodes_to_render, move_bar)-- render bounding boxlocal bounding_box = {type='rectangle', drawmode='line', r=0.5, g=0.5, b=0.5, x=node.x-10, y=node.y-10, corner_radius=5}table.insert(nodes_to_render, bounding_box)
if node_to_render thennode_to_render.w = node.w+20node_to_render.h = math.max(node.h, 3*node.editor.line_height)+20end
move_bar.w = node.w/2bounding_box.w = node.w+20local buffer_height = math.max(node.h, 3*node.editor.line_height)bounding_box.h = buffer_height+20-- resize affordancetable.insert(nodes_to_render, {type='line', r=0.7,g=0.7,b=0.7, data={node.x+node.w+20,node.y, node.x+node.w+20,node.y+buffer_height}})table.insert(nodes_to_render, {type='line', r=0.7,g=0.7,b=0.7, data={node.x+node.w+20+4,node.y, node.x+node.w+20+4,node.y+buffer_height}})