From 6f78e84a47ef030229fcd25150d0925825687d13 Mon Sep 17 00:00:00 2001 From: Alexander Goryushkin Date: Wed, 24 Apr 2024 21:35:39 -0400 Subject: [PATCH] remove old data-layer-name in a blank scene --- src/street-utils.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/street-utils.js b/src/street-utils.js index 004749a4e..19603eaf6 100644 --- a/src/street-utils.js +++ b/src/street-utils.js @@ -43,6 +43,8 @@ function newScene(clearMetaData=true, clearUrlHash=true, addDefaultStreet=true) for (defaultStreetChild of defaultStreetArray) { defaultStreet.removeChild(defaultStreetChild); } + // clear data from previous scene + defaultStreet.removeAttribute('data-layer-name'); defaultStreet.removeAttribute('street'); defaultStreet.removeAttribute('streetmix-loader'); } @@ -59,8 +61,10 @@ function newScene(clearMetaData=true, clearUrlHash=true, addDefaultStreet=true) checkOrCreateEntity("environment", environmentHTML); checkOrCreateEntity("reference-layers", referenceLayersHTML); - // update sceneGraph - streetContainerEl.emit('entitycreated', streetContainerEl.sceneEl); + if (AFRAME.INSPECTOR && AFRAME.INSPECTOR.opened) { + // update sceneGraph + + } // clear metadata if (clearMetaData) {