Skip to content

Commit

Permalink
Merge pull request #97 from jun-sironamedical/fix-delete-interactor-s…
Browse files Browse the repository at this point in the history
…tyle

fix(View): fix delete style on unmount
  • Loading branch information
floryst authored Feb 1, 2023
2 parents 5182206 + 0ce9e76 commit 833d192
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/core/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -419,8 +419,16 @@ export default class View extends Component {

this.selector.delete();
this.orientationWidget.delete();
this.defaultStyle.delete();

if (
this.interactor.getInteractorStyle() === this.style ||
this.interactor.getInteractorStyle() === this.defaultStyle
) {
this.interactor.setInteractorStyle(null);
}

this.style.delete();
this.defaultStyle.delete();
this.defaultStyle = null;
this.style = null;
this.renderer = null;
Expand Down

0 comments on commit 833d192

Please sign in to comment.