blockly > browserEvents > getScrollDeltaPixels
Returns the scroll delta of a mouse event in pixel units.
Signature:
export declare function getScrollDeltaPixels(e: WheelEvent): {
x: number;
y: number;
};
Parameters
Parameter |
Type |
Description |
e |
WheelEvent |
Mouse event. |
Returns:
{ x: number; y: number; }
Scroll delta object with .x and .y properties.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-09-18 UTC.
[null,null,["Last updated 2024-09-18 UTC."],[[["The `browserEvents.getScrollDeltaPixels()` function calculates the horizontal (x) and vertical (y) scroll distances of a mouse wheel event in pixels."],["It accepts a WheelEvent as input and returns an object containing the scroll delta values."]]],[]]