* Triggered when using the mouse wheel on the view. * @param {WheelEvent} evt
(evt)
| 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. |