Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | patatra |
Hye,
Does the graphnode have a function to center its view on a graphnode? I try to do it with script but I don’t understand well the zoom.
var pos_node = start_node.get_position()
var size_node = start_node.get_size()
var viewport_size = _graph.get_viewport_rect().size
_graph.scroll_offset = (pos_node + (size_node-viewport_size)/2)/_graph.zoom
Good Day,