property detail

(r/o) int32 detail;

Typ

Zugriff

This property returns the detail about a mouse event. For now, only the mouseWheel event utilizes this property. When a user scrolls the mouse wheel, if the wheel is rotated forward (away from the user), the detail property of the mouseWheel event is 1. If the wheel is rotated backward (toward the user), the detail property of the mouseWheel event is -1.
<box on:mouseWheel="onMouseWheel();"/>

function onMouseWheel()
{
    var eventObj = shell.currentEvent;
    if (eventObj)
    {
        if (eventObj.detail == 1)
        {
            shell.print("we are scrolling up");
        }
        else if (eventObj.detail == -1)
        {
            shell.print("we are scrolling down");
        }
    }
}