lazy-widgets
Version:
Typescript retained mode GUI for the HTML canvas API
24 lines • 918 B
JavaScript
import { FocusType } from '../core/FocusType.js';
import { PointerEvent } from './PointerEvent.js';
/**
* A pointer move {@link PointerEvent}.
*
* Has a focus type of {@link FocusType.Pointer} and does not need focus.
*
* @category Event
*/
export class PointerMoveEvent extends PointerEvent {
constructor(x, y, shift, ctrl, alt, source, target = null) {
super(x, y, shift, ctrl, alt, source, target);
this.type = PointerMoveEvent.type;
this.focusType = FocusType.Pointer;
}
correctOffset(xOffset, yOffset) {
return new PointerMoveEvent(this.x - xOffset, this.y - yOffset, this.shift, this.ctrl, this.alt, this.source, this.target);
}
cloneWithTarget(target) {
return new PointerMoveEvent(this.x, this.y, this.shift, this.ctrl, this.alt, this.source, target);
}
}
PointerMoveEvent.type = 'pointer-move';
//# sourceMappingURL=PointerMoveEvent.js.map