-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheventDispatcher-patch.ts
More file actions
21 lines (18 loc) · 850 Bytes
/
eventDispatcher-patch.ts
File metadata and controls
21 lines (18 loc) · 850 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// ------------------------------------------------------------------------------
// Copyright (c) 2017-present, RobotlegsJS. All Rights Reserved.
//
// NOTICE: You are permitted to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
// ------------------------------------------------------------------------------
/**
* Patch PIXI event handling.
*
* - Proxy PIXI events to be compatible with EventDispatcher
* - Implements event bubbling on `dispatchEvent` when `bubbles` is true.
*/
const EventDispatcherMixin = {
once(type: string, listener: Function, thisObject?: any, useCapture?: boolean, priority?: number): void {
this.on(type, listener, thisObject, true, null, useCapture);
}
};
Object.assign(createjs.EventDispatcher.prototype, EventDispatcherMixin);