Skip to content

Commit

Permalink
Merge pull request #6838 from domoritz/finalize2
Browse files Browse the repository at this point in the history
Finalize Vega view before creating a new one
  • Loading branch information
ian-r-rose committed Jul 19, 2019
2 parents 5c46ce6 + fd28d0a commit 84539f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/vega4-extension/src/index.ts
Expand Up @@ -85,6 +85,10 @@ export class RenderedVega extends Widget implements IRenderMime.IRenderer {
this.node.textContent = '';
this.node.appendChild(el);

if (this._result) {
this._result.view.finalize();
}

this._result = await vega.default(el, spec, {
actions: true,
defaultStyle: true,
Expand Down
4 changes: 4 additions & 0 deletions packages/vega5-extension/src/index.ts
Expand Up @@ -85,6 +85,10 @@ export class RenderedVega extends Widget implements IRenderMime.IRenderer {
this.node.textContent = '';
this.node.appendChild(el);

if (this._result) {
this._result.view.finalize();
}

this._result = await vega.default(el, spec, {
actions: true,
defaultStyle: true,
Expand Down

0 comments on commit 84539f1

Please sign in to comment.