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


TypeScript signaling.Signal0類代碼示例

本文整理匯總了TypeScript中core/signaling.Signal0的典型用法代碼示例。如果您正苦於以下問題:TypeScript Signal0類的具體用法?TypeScript Signal0怎麽用?TypeScript Signal0使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Signal0類的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: redo

 redo(): void {
   if (this.can_redo()) {
     this.state.index += 1
     this._do_state_change(this.state.index)
     this.state_changed.emit()
   }
 }
開發者ID:gully,項目名稱:bokeh,代碼行數:7,代碼來源:plot_canvas.ts

示例2: extend

  push_state(type: string, new_info: Partial<StateInfo>): void {
    const {history, index} = this.state

    const prev_info = history[index] != null ? history[index].info : {}
    const info = extend({}, this._initial_state_info, prev_info, new_info)

    this.state.history = this.state.history.slice(0, this.state.index + 1)
    this.state.history.push({type, info})
    this.state.index = this.state.history.length - 1

    this.state_changed.emit()
  }
開發者ID:gully,項目名稱:bokeh,代碼行數:12,代碼來源:plot_canvas.ts

示例3: initialize

  initialize(options: any): void {
    this.pause()

    super.initialize(options)

    this._tiles_loaded = false
    this.zoom_count = 0

    const {zoom, lat, lng} = this.model.map_options
    this.initial_zoom = zoom
    this.initial_lat = lat
    this.initial_lng = lng

    this.canvas_view.map_el!.style.position = "absolute"

    if (typeof google === "undefined" || google.maps == null) {
      if (typeof window._bokeh_gmaps_callback === "undefined") {
        load_google_api(this.model.api_key)
      }
      gmaps_ready.connect(() => this.request_render())
    }

    this.unpause()
  }
開發者ID:jsignell,項目名稱:bokeh,代碼行數:24,代碼來源:gmap_plot_canvas.ts

示例4:

document.addEventListener("click", () => clear_menus.emit())
開發者ID:Zyell,項目名稱:bokeh,代碼行數:1,代碼來源:common.ts

示例5:

 clear_state(): void {
   this.state = {history: [], index: -1}
   this.state_changed.emit()
 }
開發者ID:gully,項目名稱:bokeh,代碼行數:4,代碼來源:plot_canvas.ts

示例6: throttle

this.throttled_paint = throttle((() => this.force_paint.emit()), 15)  // TODO (bev) configurable
開發者ID:gully,項目名稱:bokeh,代碼行數:1,代碼來源:plot_canvas.ts

示例7: update

 update({left, right, top, bottom}: {left: number | null, right: number | null, top: number | null, bottom: number | null}): void {
   this.setv({left, right, top, bottom, screen: true}, {silent: true})
   this.data_update.emit()
 }
開發者ID:Zyell,項目名稱:bokeh,代碼行數:4,代碼來源:box_annotation.ts

示例8:

 window._bokeh_gmaps_callback = () => gmaps_ready.emit()
開發者ID:jsignell,項目名稱:bokeh,代碼行數:1,代碼來源:gmap_plot_canvas.ts

示例9: update

 update({xs, ys}: {xs: number[], ys: number[]}): void {
   this.setv({xs, ys, screen: true}, {silent: true})
   this.data_update.emit()
 }
開發者ID:Zyell,項目名稱:bokeh,代碼行數:4,代碼來源:poly_annotation.ts


注:本文中的core/signaling.Signal0類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。