Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ipywidgets_bokeh/src/manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export class WidgetManager extends HTMLManager {
model.comm_live = true
}

async render(bundle: ModelBundle, el: HTMLElement): Promise<WidgetView | null> {
async render(bundle: ModelBundle, el: HTMLElement, onDisplay: () => void): Promise<WidgetView | null> {
const {spec, state} = bundle
const new_models = state.state
for (const [id, new_model] of entries(new_models)) {
Expand Down Expand Up @@ -190,6 +190,7 @@ export class WidgetManager extends HTMLManager {
}

const view = await this.create_view(model, {el})
view.on("displayed", onDisplay)
await this.display_view(view, el)
return view
} finally {
Expand Down
2 changes: 1 addition & 1 deletion ipywidgets_bokeh/src/widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class IPyWidgetView extends LayoutDOMView {
const manager = widget_managers.get(document)
assert(manager != null, "manager is null")

this.ipy_view = await manager.render(this.model.bundle, this.container)
this.ipy_view = await manager.render(this.model.bundle, this.container, () => this.invalidate_layout())
} else {
this.container.append(this.ipy_view.el)
}
Expand Down
2 changes: 1 addition & 1 deletion ipywidgets_bokeh/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ module.exports = (env={}, argv={}) => {
}
],
module: {rules},
devtool: minimize ? false : "source-map",
devtool: mode === "development" ? 'inline-source-map' : false,
mode,
optimization: {minimize},
}
Expand Down
Loading