mirror of
				https://github.com/immich-app/immich.git
				synced 2025-11-04 03:27:09 -05:00 
			
		
		
		
	fix: disable map fly animation when switching between assets (#19223)
This commit is contained in:
		
							parent
							
								
									00536bf074
								
							
						
					
					
						commit
						864fe3d0d6
					
				@ -74,6 +74,8 @@
 | 
				
			|||||||
    showSimpleControls = true,
 | 
					    showSimpleControls = true,
 | 
				
			||||||
  }: Props = $props();
 | 
					  }: Props = $props();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  const initialCenter = center;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  let map: maplibregl.Map | undefined = $state();
 | 
					  let map: maplibregl.Map | undefined = $state();
 | 
				
			||||||
  let marker: maplibregl.Marker | null = null;
 | 
					  let marker: maplibregl.Marker | null = null;
 | 
				
			||||||
  let abortController: AbortController;
 | 
					  let abortController: AbortController;
 | 
				
			||||||
@ -247,6 +249,10 @@
 | 
				
			|||||||
      },
 | 
					      },
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
  });
 | 
					  });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  $effect(() => {
 | 
				
			||||||
 | 
					    map?.jumpTo({ center, zoom });
 | 
				
			||||||
 | 
					  });
 | 
				
			||||||
</script>
 | 
					</script>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
<!--  We handle style loading ourselves so we set style blank here -->
 | 
					<!--  We handle style loading ourselves so we set style blank here -->
 | 
				
			||||||
@ -254,8 +260,8 @@
 | 
				
			|||||||
  {hash}
 | 
					  {hash}
 | 
				
			||||||
  style=""
 | 
					  style=""
 | 
				
			||||||
  class="h-full {rounded ? 'rounded-2xl' : 'rounded-none'}"
 | 
					  class="h-full {rounded ? 'rounded-2xl' : 'rounded-none'}"
 | 
				
			||||||
  {center}
 | 
					 | 
				
			||||||
  {zoom}
 | 
					  {zoom}
 | 
				
			||||||
 | 
					  center={initialCenter}
 | 
				
			||||||
  attributionControl={false}
 | 
					  attributionControl={false}
 | 
				
			||||||
  diffStyleUpdates={true}
 | 
					  diffStyleUpdates={true}
 | 
				
			||||||
  onload={(event) => {
 | 
					  onload={(event) => {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user