How to extent click buffer when using view.on("click", function(event){)

256
0
07-29-2021 08:06 AM
PHerk
by
New Contributor II
view.on("click", function(event){
view.hitTest(event.screenPoint)
.then(function(response){
if (response.results.length > 0) {
<code>
}
}
});​

This piece of code fires when I touch the view.

When the view is zoomed in to a very 'deep' level, sometimes a touch on the screen does not give a hit on the graphic. The user has clicked a little to much to the side or above/under the graphic. Is there a way to expand the 'hit buffer', the area around the graphic where this routine fires?

Thanks

 

0 Kudos
0 Replies