setting the selection tool using viewer.ready rather than loading.done.