refactor bbox click listener