diff --git a/src/tracks/gosling-track/gosling-track.ts b/src/tracks/gosling-track/gosling-track.ts index 66ca4054..e761fc3f 100644 --- a/src/tracks/gosling-track/gosling-track.ts +++ b/src/tracks/gosling-track/gosling-track.ts @@ -399,7 +399,8 @@ const factory: PluginTrackFactory = (HGC, context, op this.pBackground.clear(); this.pBackground.removeChildren(); this.pBorder.clear(); - this.pBorder.removeChildren(); + const children = this.pBorder.removeChildren(); + children.forEach(c => c.destroy()); this.displayedLegends = []; // Because a single tile contains one track or multiple tracks overlaid, we draw marks and embellishments