7 changed files with 53 additions and 13 deletions
@ -0,0 +1,17 @@ |
|||
import * as React from "react"; |
|||
import {PointerEventMessageBase} from "src/Models/Input/PointerEventMessageBase"; |
|||
|
|||
export class ScrollEventMessage extends PointerEventMessageBase { |
|||
public readonly deltaX: number; |
|||
public readonly deltaY: number; |
|||
|
|||
constructor(e: React.WheelEvent) { |
|||
super(e); |
|||
this.deltaX = -e.deltaX; |
|||
this.deltaY = -e.deltaY; |
|||
} |
|||
|
|||
public toString = () : string => { |
|||
return `scroll:${this.modifiers}:${this.x}:${this.y}:${this.deltaX}:${this.deltaY}`; |
|||
} |
|||
} |
|||
Loading…
Reference in new issue