fix flickering when transitioning from satellite view to street view
All checks were successful
pedestrian-simulator / build (push) Successful in 58s
All checks were successful
pedestrian-simulator / build (push) Successful in 58s
This commit is contained in:
@@ -1702,14 +1702,14 @@ function updateViewMode() {
|
||||
// Switching TO Street View (from Satellite/Map)
|
||||
// Transition: Animate Main Map shrinking into Minimap
|
||||
|
||||
// Show SV and Minimap immediately so they are visible behind the shrinking map
|
||||
panoDiv.classList.remove('hidden-mode');
|
||||
minimapContainer.classList.remove('hidden-mode');
|
||||
|
||||
// Trigger resize early to ensure pano is rendered correctly during reveal
|
||||
google.maps.event.trigger(panorama, 'resize');
|
||||
|
||||
animateMapToMinimap(() => {
|
||||
// Show SV and Minimap, Hide Main Map
|
||||
panoDiv.classList.remove('hidden-mode');
|
||||
minimapContainer.classList.remove('hidden-mode');
|
||||
|
||||
// Fix Black Screen: Trigger resize when pano becomes visible
|
||||
google.maps.event.trigger(panorama, 'resize');
|
||||
|
||||
mainMapDiv.classList.add('hidden-mode');
|
||||
// Ensure styles are cleaned up
|
||||
mainMapDiv.style.top = '';
|
||||
@@ -1743,8 +1743,7 @@ function updateViewMode() {
|
||||
|
||||
if (mainMapDiv.classList.contains('hidden-mode')) {
|
||||
// Switching FROM Street View TO Map
|
||||
// Hide SV immediately for clean transition? Or keep behind?
|
||||
panoDiv.classList.add('hidden-mode');
|
||||
// Keep SV visible behind for clean transition
|
||||
|
||||
animateMapToFullscreen(() => {
|
||||
minimapContainer.classList.add('hidden-mode');
|
||||
@@ -1753,7 +1752,6 @@ function updateViewMode() {
|
||||
});
|
||||
} else {
|
||||
// Just switching Map <-> Satellite (No animation needed)
|
||||
panoDiv.classList.add('hidden-mode');
|
||||
mainMapDiv.classList.remove('hidden-mode');
|
||||
minimapContainer.classList.add('hidden-mode');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user