संदर्भ mouseWheel()

mouseWheel()

Calls a function when the mouse wheel scrolls over the element.

The callback function, fxn, is passed an event object. event has two numeric properties, deltaY and deltaX. event.deltaY is negative if the mouse wheel rotates away from the user. It's positive if the mouse wheel rotates toward the user. event.deltaX is positive if the mouse wheel moves to the right. It's negative if the mouse wheel moves to the left.

Calling myElement.mouseWheel(false) disables the function.

उदाहरण

सिंटैक्स

mouseWheel(fxn)

पैरामीटर्स

fxn
Function|Boolean:

function to call when the mouse wheel is scrolled over the element. false disables the function.

This page is generated from the comments in src/core/p5.Element.js . Please feel free to edit it and submit a pull request!

संबंधित संदर्भ