Skip to content

Commit

Permalink
Merge pull request #91 from Priemar/Fixed_#90
Browse files Browse the repository at this point in the history
fixed (ar.android) fixed error when adding model after ar is recreated (#90)
  • Loading branch information
EddyVerbruggen authored Nov 28, 2019
2 parents 7d6b031 + d2b2976 commit 699dfa0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/ar.android.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,11 @@ export class AR extends ARBase {

disposeNativeView(): void {
super.disposeNativeView();
// (fix: #90) remove anchor node
if (_origin) {
_origin.setParent(null);
_origin = null;
}
// destroy AR fragment
const supportFragmentManager = (application.android.foregroundActivity || application.android.startActivity).getSupportFragmentManager();
supportFragmentManager.beginTransaction().remove(_fragment).commit();
Expand Down

0 comments on commit 699dfa0

Please sign in to comment.