forked from MapComplete/MapComplete
		
	Performance: add map.resize() at appropriate time for initial map load
This commit is contained in:
		
							parent
							
								
									7947fc3fbc
								
							
						
					
					
						commit
						f8349cb2b9
					
				
					 2 changed files with 6 additions and 12 deletions
				
			
		|  | @ -98,7 +98,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap { | |||
| 
 | ||||
|         maplibreMap.addCallbackAndRunD((map) => { | ||||
|             map.on("load", () => { | ||||
|                 map.resize() | ||||
|                 self.MoveMapToCurrentLoc(self.location.data) | ||||
|                 self.SetZoom(self.zoom.data) | ||||
|                 self.setMaxBounds(self.maxbounds.data) | ||||
|  | @ -111,7 +110,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap { | |||
|                 self.setBackground() | ||||
|                 this.updateStores(true) | ||||
|             }) | ||||
|             map.resize() | ||||
|             self.MoveMapToCurrentLoc(self.location.data) | ||||
|             self.SetZoom(self.zoom.data) | ||||
|             self.setMaxBounds(self.maxbounds.data) | ||||
|  | @ -293,7 +291,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap { | |||
|         } | ||||
|         map.triggerRepaint() | ||||
|         await promise | ||||
|         map.resize() | ||||
|     } | ||||
| 
 | ||||
|     private async drawElement( | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue