File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
packages/perspective-viewer/src/js Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -457,11 +457,13 @@ class PerspectiveViewer extends ActionElement {
457
457
* user state). This (or the underlying `perspective.table`'s equivalent
458
458
* method) must be called in order for its memory to be reclaimed.
459
459
*
460
+ * @param {boolean } delete_table Should a delete call also be made to the
461
+ * underlying `table()`.
460
462
* @returns {Promise<boolean> } Whether or not this call resulted in the
461
463
* underlying `perspective.table` actually being deleted.
462
464
*/
463
- delete ( ) {
464
- let x = this . _clear_state ( ) ;
465
+ delete ( delete_table = true ) {
466
+ let x = this . _clear_state ( delete_table ) ;
465
467
if ( this . _plugin . delete ) {
466
468
this . _plugin . delete . call ( this ) ;
467
469
}
Original file line number Diff line number Diff line change @@ -312,7 +312,7 @@ export class PerspectiveElement extends StateElement {
312
312
return ( ) => this . setAttribute ( "render_time" , performance . now ( ) - t ) ;
313
313
}
314
314
315
- _clear_state ( ) {
315
+ _clear_state ( clear_table = true ) {
316
316
if ( this . _task ) {
317
317
this . _task . cancel ( ) ;
318
318
}
@@ -324,7 +324,7 @@ export class PerspectiveElement extends StateElement {
324
324
view . remove_update ( this . _view_updater ) ;
325
325
view . remove_delete ( ) ;
326
326
}
327
- if ( this . _table ) {
327
+ if ( this . _table && clear_table ) {
328
328
const table = this . _table ;
329
329
this . _table = undefined ;
330
330
if ( table . _owner_viewer && table . _owner_viewer === this ) {
You can’t perform that action at this time.
0 commit comments