Reload page sau khi nhấn nút close 3D view

This commit is contained in:
2026-06-11 18:55:32 +07:00
parent 0434837026
commit 92887c9ac3
+7
View File
@@ -146,6 +146,7 @@ function closeViewer() {
localStorage.removeItem('activeSceneToken');
localStorage.removeItem('activeScenePitch');
localStorage.removeItem('activeSceneYaw');
localStorage.removeItem('activeTourId');
if (activeViewer) {
try {
@@ -153,6 +154,12 @@ function closeViewer() {
} catch (e) {}
activeViewer = null;
}
// Đối với người dùng public (Guest), thực hiện reload trang để dọn dẹp các marker từ tour được chia sẻ
const token = localStorage.getItem('jwt');
if (!token) {
window.location.reload();
}
}
/**