UNPKG

lazy-widgets

Version:

Typescript retained mode GUI for the HTML canvas API

23 lines 923 B
import { PointerButtonEvent } from './PointerButtonEvent.js'; /** * A pointer press {@link PointerButtonEvent} (pointer button down). * * Has no focus type and does not need focus. * * @category Event */ export class PointerPressEvent extends PointerButtonEvent { constructor(x, y, button, shift, ctrl, alt, source, target = null) { super(x, y, button, shift, ctrl, alt, source, target); this.type = PointerPressEvent.type; this.focusType = null; } correctOffset(xOffset, yOffset) { return new PointerPressEvent(this.x - xOffset, this.y - yOffset, this.button, this.shift, this.ctrl, this.alt, this.source, this.target); } cloneWithTarget(target) { return new PointerPressEvent(this.x, this.y, this.button, this.shift, this.ctrl, this.alt, this.source, target); } } PointerPressEvent.type = 'pointer-press'; //# sourceMappingURL=PointerPressEvent.js.map