本文整理汇总了TypeScript中app/core/utils/emitter.Emitter类的典型用法代码示例。如果您正苦于以下问题:TypeScript Emitter类的具体用法?TypeScript Emitter怎么用?TypeScript Emitter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Emitter类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: destroy
destroy() {
this.events.emit('panel-teardown');
this.events.removeAllListeners();
if (this.queryRunner) {
this.queryRunner.destroy();
this.queryRunner = null;
}
}
示例2: render
render() {
if (!this.hasRefreshed) {
this.refresh();
} else {
this.events.emit('render');
}
}
示例3: updateGridPos
updateGridPos(newPos: GridPos) {
let sizeChanged = false;
if (this.gridPos.w !== newPos.w || this.gridPos.h !== newPos.h) {
sizeChanged = true;
}
this.gridPos.x = newPos.x;
this.gridPos.y = newPos.y;
this.gridPos.w = newPos.w;
this.gridPos.h = newPos.h;
if (sizeChanged) {
this.events.emit('panel-size-changed');
}
}
示例4: updateGridPos
updateGridPos(newPos: GridPos) {
let sizeChanged = false;
if (this.gridPos.w !== newPos.w || this.gridPos.h !== newPos.h) {
sizeChanged = true;
}
this.gridPos.x = newPos.x;
this.gridPos.y = newPos.y;
this.gridPos.w = newPos.w;
this.gridPos.h = newPos.h;
if (sizeChanged) {
console.log('PanelModel sizeChanged event and render events fired');
this.events.emit('panel-size-changed');
}
}
示例5: initialized
initialized() {
this.events.emit('panel-initialized');
}
示例6: refresh
refresh() {
this.hasRefreshed = true;
this.events.emit('refresh');
}
示例7: resizeDone
resizeDone() {
this.events.emit('panel-size-changed');
}
示例8: setViewMode
setViewMode(fullscreen: boolean, isEditing: boolean) {
this.fullscreen = fullscreen;
this.isEditing = isEditing;
this.events.emit('view-mode-changed');
}
示例9: destroy
destroy() {
this.events.emit('panel-teardown');
this.events.removeAllListeners();
}
示例10: destroy
destroy() {
this.events.removeAllListeners();
}