Need barebone code example how to catch and respond to mouse wheel, in functional widget

230
1
Jump to solution
03-04-2024 11:41 PM
Labels (2)
MichaelLev
Occasional Contributor III

I develop on EXB 1.13 for 3D web apps.

I succeeded to respond to mouse wheel by responding to extent changes, but I want to know how to catch and respond to mouse wheel changes directly.

0 Kudos
1 Solution

Accepted Solutions
JeffreyThompson2
MVP Regular Contributor

https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#event-mouse-wheel

view.on("mouse-wheel", function(event){
 // deltaY value is positive when wheel is scrolled up
 // and it is negative when wheel is scrolled down.
 console.log(event.deltaY);
});
GIS Developer
City of Arlington, Texas

View solution in original post

0 Kudos
1 Reply
JeffreyThompson2
MVP Regular Contributor

https://developers.arcgis.com/javascript/latest/api-reference/esri-views-View.html#event-mouse-wheel

view.on("mouse-wheel", function(event){
 // deltaY value is positive when wheel is scrolled up
 // and it is negative when wheel is scrolled down.
 console.log(event.deltaY);
});
GIS Developer
City of Arlington, Texas
0 Kudos