refactor tooltip to use same code than info window