Refactored tree visualization to emit the onNavigation event initially as well as per interaction.