本文整理汇总了TypeScript中app/core/utils/emitter.Emitter.emit方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Emitter.emit方法的具体用法?TypeScript Emitter.emit怎么用?TypeScript Emitter.emit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app/core/utils/emitter.Emitter
的用法示例。
在下文中一共展示了Emitter.emit方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: render
render() {
if (!this.hasRefreshed) {
this.refresh();
} else {
this.events.emit('render');
}
}
示例2: destroy
destroy() {
this.events.emit('panel-teardown');
this.events.removeAllListeners();
if (this.queryRunner) {
this.queryRunner.destroy();
this.queryRunner = null;
}
}
示例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();
}