當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript emitter.Emitter類代碼示例

本文整理匯總了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;未經允許,請勿轉載。