@robotlegsjs/createjs
Version:
CreateJS View Integration with RobotlegsJS
38 lines • 2 kB
JavaScript
;
// ------------------------------------------------------------------------------
// 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.
// ------------------------------------------------------------------------------
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConvertToEventDispatcher = void 0;
/**
* Makes the bridge between the createjs.EventDispatcher and IEventDispatcher.
*/
var ConvertToEventDispatcher = /** @class */ (function () {
function ConvertToEventDispatcher(createjsEventDispatcher) {
this._createjsEventDispatcher = createjsEventDispatcher;
}
ConvertToEventDispatcher.prototype.addEventListener = function (type, listener, thisObject, useCapture, priority) {
this._createjsEventDispatcher.on(type, listener, thisObject, false, null, useCapture);
};
ConvertToEventDispatcher.prototype.once = function (type, listener, thisObject, useCapture, priority) {
this._createjsEventDispatcher.on(type, listener, thisObject, true, null, useCapture);
};
ConvertToEventDispatcher.prototype.removeEventListener = function (type, listener, thisObject, useCapture) {
this._createjsEventDispatcher.off(type, listener, useCapture);
};
ConvertToEventDispatcher.prototype.hasEventListener = function (type) {
return this._createjsEventDispatcher.hasEventListener(type);
};
ConvertToEventDispatcher.prototype.dispatchEvent = function (event) {
return this._createjsEventDispatcher.dispatchEvent(event);
};
ConvertToEventDispatcher.prototype.willTrigger = function (type) {
return this._createjsEventDispatcher.willTrigger(type);
};
return ConvertToEventDispatcher;
}());
exports.ConvertToEventDispatcher = ConvertToEventDispatcher;
//# sourceMappingURL=ConvertToEventDispatcher.js.map