Files
Foundry-VTT-Docker/resources/app/node_modules/@pixi/events/lib/FederatedEvent.mjs.map

1 line
8.4 KiB
Plaintext
Raw Normal View History

2025-01-04 00:34:03 +01:00
{"version":3,"file":"FederatedEvent.mjs","sources":["../src/FederatedEvent.ts"],"sourcesContent":["import { Point } from '@pixi/core';\n\nimport type { EventBoundary } from './EventBoundary';\nimport type { FederatedEventTarget } from './FederatedEventTarget';\n\nexport interface PixiTouch extends Touch\n{\n button: number;\n buttons: number;\n isPrimary: boolean;\n width: number;\n height: number;\n tiltX: number;\n tiltY: number;\n pointerType: string;\n pointerId: number;\n pressure: number;\n twist: number;\n tangentialPressure: number;\n layerX: number;\n layerY: number;\n offsetX: number;\n offsetY: number;\n isNormalized: boolean;\n type: string;\n}\n\n/**\n * An DOM-compatible synthetic event implementation that is \"forwarded\" on behalf of an original\n * FederatedEvent or native {@link https://dom.spec.whatwg.org/#event Event}.\n * @memberof PIXI\n * @typeParam N - The type of native event held.\n */\nexport class FederatedEvent<N extends UIEvent | PixiTouch = UIEvent | PixiTouch> implements UIEvent\n{\n /** Flags whether this event bubbles. This will take effect only if it is set before propagation. */\n public bubbles = true;\n\n /** @deprecated since 7.0.0 */\n public cancelBubble = true;\n\n /**\n * Flags whether this event can be canceled using {@link PIXI.FederatedEvent.preventDefault}. This is always\n * false (for now).\n */\n public readonly cancelable = false;\n\n /**\n * Flag added for compatibility with DOM {@code Event}. It is not used in the Federated Events\n * API.\n * @see https://dom.spec.whatwg.org/#dom-event-composed\n */\n public readonly composed = false;\n\n /** The listeners of the event target that are being notified. */\n public currentTarget: FederatedEventTarget;\n\n /** Flags whether the default response of the user agent was prevent through this event. */\n public defaultPrevented = false;\n\n /**\n * The propagation phase.\n * @default {@link PIXI.FederatedEvent.NONE}\n */\n public eventPhase = FederatedEvent.prototype.NONE;\n\n /** Flags whether this is a user-trusted event */\n public isTrusted: boolean;\n\n /** @deprecated since 7.0.0 */\n public returnValue: boolean;\n\n /** @deprecated since 7.0.0 */\n public srcElement: EventTarget;\n\n /** The event target that this will be dispatched to. */\n public target: FederatedEventTarget;\n\n /** The timestamp of when the event was created. */\n public timeStamp: number;\n\n /** The type of event, e.g. {@code \"mouseup\"}. */\n public type: string;\n\n /** The native event that caused the foremost original event. */\n public nativeEvent: N;\n\n /** The original event that caused this event, if any. */\n public originalEvent: FederatedEvent<N>;\n\n /** Flags whether propagation was stopped. */\n public propagationStopped = false;\n\n /** Flags whether propagation was immediately stopped. */\n public propagationImmediatelyStopped = false;\n\n /** The composed path of the event's propagation. The {@code target} is at the end. */\n public path: FederatedEventTarget[];\n\n /** The {@link PIXI.EventBoundary} that manages this event. Null for root events. */\n public readonly manager: EventBoundary;\n\n /** Event-specific detail */\n public detail: number;\n\n /** The global Window object. */\n public view: WindowProxy;\n\n /**\n * Not supported.\n * @deprecated since 7.0.0\n */\n public which: number;\n\n /** The coordinates of the evnet relative to the nearest DOM layer. This is a non-standard property. */\n public layer: Point = new Point();\n\n /** @readonly */\n get layerX(): number { return this.layer.x; }\n\n /** @readonly */\n get layerY(): number { return this.layer.y; }\n\n /** The coordinates of the event relative to the DOM document. This is a non-standard property. */\n public page: Point = new Point();\n\n /** @readonly */\n get pageX(): number { return this.pa