2023-10-21 17:54:12 +01:00
|
|
|
update_editor_box = function(node)
|
2022-12-26 00:56:47 +00:00
|
|
|
if node.editor == nil then return end
|
2023-10-23 03:50:08 +01:00
|
|
|
if node.y > Viewport.y then
|
2023-10-21 17:54:12 +01:00
|
|
|
if node ~= Cursor_node then
|
2022-12-26 00:56:47 +00:00
|
|
|
node.editor.screen_top1.line = 1
|
|
|
|
node.editor.screen_top1.pos = 1
|
|
|
|
end
|
2023-10-25 17:28:14 +01:00
|
|
|
node.editor.top = node.y
|
2022-12-26 00:56:47 +00:00
|
|
|
else
|
2023-10-25 09:20:01 +01:00
|
|
|
node.editor.screen_top1, node.editor.top = schema1_of_y(node.editor, scale(Viewport.y-node.y))
|
2023-04-23 06:27:30 +01:00
|
|
|
end
|
2022-12-26 00:56:47 +00:00
|
|
|
node.editor.left = math.floor(vx(node.x))
|
|
|
|
node.editor.right = math.ceil(vx(node.x+node.w))
|
2023-04-23 06:27:30 +01:00
|
|
|
node.editor.width = node.editor.right - node.editor.left
|
2022-12-26 00:56:47 +00:00
|
|
|
edit.update_font_settings(node.editor, scale(20))
|
|
|
|
Text.redraw_all(node.editor)
|
2023-04-23 06:27:30 +01:00
|
|
|
end
|