MCPcopy Create free account
hub / github.com/cryptii/cryptii / mouseDidWheel

Method mouseDidWheel

src/View/Pipe.js:418–429  ·  view source on GitHub ↗

* Triggered when using the mouse wheel on the view. * @param {WheelEvent} evt

(evt)

Source from the content-addressed store, hash-verified

416 * @param {WheelEvent} evt
417 */
418 mouseDidWheel (evt) {
419 const deltaX = evt.deltaX
420 const deltaY = evt.deltaY
421
422 if (Math.abs(deltaX) <= Math.abs(deltaY)) {
423 // Ignore vertical scrolling
424 return
425 }
426
427 evt.preventDefault()
428 this.scrollTo(this._scrollPosition + deltaX)
429 }
430
431 /**
432 * Triggered when scroll handle scroll starts.

Callers

nothing calls this directly

Calls 1

scrollToMethod · 0.95

Tested by

no test coverage detected