UNPKG

lazy-widgets

Version:

Typescript retained mode GUI for the HTML canvas API

30 lines 1.04 kB
import { UntargetableTricklingEvent } from './UntargetableTricklingEvent.js'; /** * A tab selection {@link TricklingEvent}. Dispatched when tab is pressed and * either the keyboard-focused widget doesn't capture the event, or when * manually dispatched. * * For internal use only. Do not use this event unless you know what you're * doing. * * @category Event */ export class TabSelectEvent extends UntargetableTricklingEvent { constructor(relativeTo, reversed) { super(reversed); this.type = TabSelectEvent.type; this.focusType = null; this.needsFocus = false; this.userCapturable = true; this.relativeTo = relativeTo; this.reachedRelative = relativeTo === null; } cloneWithTarget(target) { super.warnUntargetable(target); const event = new TabSelectEvent(this.relativeTo, this.reversed); event.reachedRelative = this.reachedRelative; return event; } } TabSelectEvent.type = 'tab-select'; //# sourceMappingURL=TabSelectEvent.js.map