Skip to content

Commit

Permalink
imporve the track controller #102
Browse files Browse the repository at this point in the history
  • Loading branch information
cavencj committed May 17, 2022
1 parent f5e3e46 commit f419500
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/history-track/TrackController.js
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ class TrackController {
* @returns {TrackController}
*/
clear() {
this._cache = {}
Object.keys(this._cache).forEach(key => {
this.removeTrack(this._cache[key])
})
this._activedTrack && (this._activedTrack.viewed = false)
this._activedTrack = undefined
this._viewer.off(SceneEventType.POST_RENDER, this._onPostRender, this)
Expand Down

0 comments on commit f419500

Please sign in to comment.