add function to set selected node's position center in the screen