File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/webviews/webview-side/vega-renderer Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,10 @@ interface Metadata {
1111}
1212
1313/**
14- * Renderer for Vega/Vega-Lite charts (application/vnd.vega.v5+json).
15- * Currently renders static text representation of the chart spec.
14+ * Renderer for Vega charts (application/vnd.vega.v5+json).
1615 */
1716export const activate : ActivationFunction = ( _context : RendererContext < unknown > ) => {
18- const elementsCache : Record < string , HTMLElement > = { } ;
17+ const elementsCache : Record < string , HTMLElement | undefined > = { } ;
1918 return {
2019 renderOutputItem ( outputItem : OutputItem , element : HTMLElement ) {
2120 console . log ( `Vega renderer - rendering output item: ${ outputItem . id } ` ) ;
@@ -52,6 +51,7 @@ export const activate: ActivationFunction = (_context: RendererContext<unknown>)
5251 disposeOutputItem ( id ?: string ) {
5352 if ( id && elementsCache [ id ] ) {
5453 ReactDOM . unmountComponentAtNode ( elementsCache [ id ] ) ;
54+ elementsCache [ id ] = undefined ;
5555 }
5656 }
5757 } ;
You can’t perform that action at this time.
0 commit comments