本文整理汇总了TypeScript中core/build_views.build_views函数的典型用法代码示例。如果您正苦于以下问题:TypeScript build_views函数的具体用法?TypeScript build_views怎么用?TypeScript build_views使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了build_views函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的TypeScript代码示例。
示例1: build_tools
build_tools() {
const tool_models = this.model.plot.toolbar.tools;
const new_tool_views = build_views(this.tool_views, tool_models, this.view_options());
return new_tool_views.map((tool_view) =>
this.ui_event_bus.register_tool(tool_view));
}
开发者ID:FourtekIT-incubator,项目名称:bokeh,代码行数:7,代码来源:plot_canvas.ts
示例2: initialize
initialize(options: any): void {
super.initialize(options)
this.xscale = this.plot_view.frame.xscales.default
this.yscale = this.plot_view.frame.yscales.default
this._renderer_views = {}
;[this.node_view, this.edge_view] = build_views(this._renderer_views,
[this.model.node_renderer, this.model.edge_renderer], {parent: this.parent}) as [GlyphRendererView, GlyphRendererView]
this.set_data()
}
开发者ID:jsignell,项目名称:bokeh,代码行数:12,代码来源:graph_renderer.ts
示例3: initialize
initialize(options: any): void {
super.initialize(options);
this.xscale = this.plot_view.frame.xscales["default"];
this.yscale = this.plot_view.frame.yscales["default"];
this._renderer_views = {};
[this.node_view, this.edge_view] = build_views(this._renderer_views,
[this.model.node_renderer, this.model.edge_renderer], this.plot_view.view_options());
this.set_data();
}
开发者ID:FourtekIT-incubator,项目名称:bokeh,代码行数:12,代码来源:graph_renderer.ts
示例4: render
render(): void {
super.render()
empty(this.el)
this.buttonEl = this._render_button(this.model.label)
this.buttonEl.addEventListener("click", (event) => this._button_click(event))
this.el.appendChild(this.buttonEl)
const icon = this.model.icon
if (icon != null) {
build_views(this.icon_views, [icon], {parent: this})
prepend(this.buttonEl, this.icon_views[icon.id].el, nbsp)
}
}
开发者ID:FourtekIT-incubator,项目名称:bokeh,代码行数:14,代码来源:abstract_button.ts
示例5: render
render(): void {
super.render()
this.button_el = this._render_button(this.model.label)
this.button_el.addEventListener("click", () => this.click())
const icon = this.model.icon
if (icon != null) {
build_views(this.icon_views, [icon], {parent: this})
prepend(this.button_el, this.icon_views[icon.id].el, nbsp())
}
this.group_el = div({class: "bk-btn-group"}, this.button_el)
this.el.appendChild(this.group_el)
}
开发者ID:jsignell,项目名称:bokeh,代码行数:15,代码来源:abstract_button.ts
示例6: build_levels
build_levels(): void {
const renderer_models = this.model.plot.all_renderers
// should only bind events on NEW views
const old_renderers = keys(this.renderer_views)
const new_renderer_views = build_views(this.renderer_views, renderer_models, this.view_options()) as RendererView[]
const renderers_to_remove = difference(old_renderers, renderer_models.map((model) => model.id))
for (const id_ of renderers_to_remove) {
delete this.levels.glyph[id_]
}
for (const view of new_renderer_views) {
this.levels[view.model.level][view.model.id] = view
}
}
开发者ID:keyurspatel,项目名称:bokeh,代码行数:16,代码来源:plot_canvas.ts
示例7: build_levels
build_levels() {
const renderer_models = this.model.plot.all_renderers;
// should only bind events on NEW views
const old_renderers = Object.keys(this.renderer_views);
const new_renderer_views = build_views(this.renderer_views, renderer_models, this.view_options());
const renderers_to_remove = difference(old_renderers, renderer_models.map((model) => model.id))
for (const id_ of renderers_to_remove) {
delete this.levels.glyph[id_];
}
for (const view of new_renderer_views) {
this.levels[view.model.level][view.model.id] = view;
}
return this;
}
开发者ID:FourtekIT-incubator,项目名称:bokeh,代码行数:18,代码来源:plot_canvas.ts
示例8: _build_tool_button_views
protected _build_tool_button_views(): void {
const tools: ButtonTool[] = (this.model._proxied_tools != null ? this.model._proxied_tools : this.model.tools) as any // XXX
build_views(this._tool_button_views, tools, {parent: this}, (tool) => tool.button_view)
}
开发者ID:jsignell,项目名称:bokeh,代码行数:4,代码来源:toolbar_base.ts
示例9: build_tools
build_tools(): void {
const tool_models = this.model.plot.toolbar.tools
const new_tool_views = build_views(this.tool_views, tool_models, this.view_options()) as ToolView[]
new_tool_views.map((tool_view) => this.ui_event_bus.register_tool(tool_view))
}
开发者ID:gully,项目名称:bokeh,代码行数:6,代码来源:plot_canvas.ts
示例10: initialize
initialize(options: any): void {
super.initialize(options)
this.plot_view.canvas_events.appendChild(this.el)
this._toolbar_views = {}
build_views(this._toolbar_views, [this.model.toolbar], {parent: this})
}
开发者ID:gully,项目名称:bokeh,代码行数:6,代码来源:toolbar_panel.ts
注:本文中的core/build_views.build_views函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论