本文整理汇总了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()
}
}
示例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()
}
示例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()
}
示例4:
document.addEventListener("click", () => clear_menus.emit())
示例5:
clear_state(): void {
this.state = {history: [], index: -1}
this.state_changed.emit()
}
示例6: throttle
this.throttled_paint = throttle((() => this.force_paint.emit()), 15) // TODO (bev) configurable
示例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()
}
示例8:
window._bokeh_gmaps_callback = () => gmaps_ready.emit()
示例9: update
update({xs, ys}: {xs: number[], ys: number[]}): void {
this.setv({xs, ys, screen: true}, {silent: true})
this.data_update.emit()
}