Skip to content

API > @blocksuite/blocks > normalizeWheelDeltaY

Function: normalizeWheelDeltaY ​

normalizeWheelDeltaY(delta, zoom = 1): number

Normalizes wheel delta.

See https://stackoverflow.com/a/13650579

From https://github.com/excalidraw/excalidraw/blob/master/src/components/App.tsx MIT License

Parameters ​

ParameterTypeDefault value
deltanumberundefined
zoomnumber1

Returns ​

number

Defined In ​

packages/blocks/src/surface-block/utils/index.ts:19