本文整理汇总了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;
}
}
开发者ID:johntdyer,项目名称:grafana,代码行数:9,代码来源:PanelModel.ts
示例2: render
render() {
if (!this.hasRefreshed) {
this.refresh();
} else {
this.events.emit('render');
}
}
开发者ID:johntdyer,项目名称:grafana,代码行数:7,代码来源:PanelModel.ts
示例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');
}
}
开发者ID:johntdyer,项目名称:grafana,代码行数:16,代码来源:PanelModel.ts
示例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');
}
}
开发者ID:arcolife,项目名称:grafana,代码行数:17,代码来源:panel_model.ts
示例5: initialized
initialized() {
this.events.emit('panel-initialized');
}
开发者ID:johntdyer,项目名称:grafana,代码行数:3,代码来源:PanelModel.ts
示例6: refresh
refresh() {
this.hasRefreshed = true;
this.events.emit('refresh');
}
开发者ID:johntdyer,项目名称:grafana,代码行数:4,代码来源:PanelModel.ts
示例7: resizeDone
resizeDone() {
this.events.emit('panel-size-changed');
}
开发者ID:johntdyer,项目名称:grafana,代码行数:3,代码来源:PanelModel.ts
示例8: setViewMode
setViewMode(fullscreen: boolean, isEditing: boolean) {
this.fullscreen = fullscreen;
this.isEditing = isEditing;
this.events.emit('view-mode-changed');
}
开发者ID:johntdyer,项目名称:grafana,代码行数:5,代码来源:PanelModel.ts
示例9: destroy
destroy() {
this.events.emit('panel-teardown');
this.events.removeAllListeners();
}
开发者ID:CorpGlory,项目名称:grafana,代码行数:4,代码来源:PanelModel.ts
示例10: destroy
destroy() {
this.events.removeAllListeners();
}
开发者ID:arcolife,项目名称:grafana,代码行数:3,代码来源:panel_model.ts
注:本文中的app/core/utils/emitter.Emitter类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论