MCPcopy
hub / github.com/autoNumeric/autoNumeric / isWheelDownEvent

Method isWheelDownEvent

src/AutoNumericHelper.js:805–811  ·  view source on GitHub ↗

* Return `true` if the given event is a wheeldown event * * @param {WheelEvent} wheelEvent * @returns {boolean}

(wheelEvent)

Source from the content-addressed store, hash-verified

803 * @returns {boolean}
804 */
805 static isWheelDownEvent(wheelEvent) {
806 if (!this.isWheelEvent(wheelEvent) || this.isUndefinedOrNullOrEmpty(wheelEvent.deltaY)) {
807 this.throwError(`The event passed as a parameter is not a valid wheel event, '${wheelEvent.type}' given.`);
808 }
809
810 return wheelEvent.deltaY > 0;
811 }
812
813 /**
814 * Return `true` if the given event is an instance of WheelEvent and the deltaY value is equal to zero

Callers 1

wheelActionMethod · 0.80

Calls 3

isWheelEventMethod · 0.95
throwErrorMethod · 0.95

Tested by

no test coverage detected