cleanup
This commit is contained in:
		
					parent
					
						
							
								a1024f508a
							
						
					
				
			
			
				commit
				
					
						e791bb2613
					
				
			
		
					 1 changed files with 3 additions and 3 deletions
				
			
		|  | @ -262,13 +262,13 @@ function mkmap(map, newnodes, lostnodes, onlinenodes, graph, gotoAnything) { | ||||||
| 
 | 
 | ||||||
|   var onlinemarkers = subtract(onlinenodes.filter(has_location), newnodes).map(mkCircleNode) |   var onlinemarkers = subtract(onlinenodes.filter(has_location), newnodes).map(mkCircleNode) | ||||||
| 
 | 
 | ||||||
|  |   var groupOnline = L.featureGroup(onlinemarkers).addTo(map) | ||||||
|   var group = L.featureGroup(markers).addTo(map) |   var group = L.featureGroup(markers).addTo(map) | ||||||
|   var group_online = L.featureGroup(onlinemarkers).addTo(map) |  | ||||||
| 
 | 
 | ||||||
|   var bounds = group.getBounds() |   var bounds = group.getBounds() | ||||||
| 
 | 
 | ||||||
|   if (!bounds.isValid()) |   if (!bounds.isValid()) | ||||||
|     bounds = group_online.getBounds() |     bounds = groupOnline.getBounds() | ||||||
| 
 | 
 | ||||||
|   if (bounds.isValid()) |   if (bounds.isValid()) | ||||||
|     map.fitBounds(bounds, {paddingTopLeft: [getSidebarWidth(), 0]}) |     map.fitBounds(bounds, {paddingTopLeft: [getSidebarWidth(), 0]}) | ||||||
|  | @ -288,7 +288,7 @@ function mkmap(map, newnodes, lostnodes, onlinenodes, graph, gotoAnything) { | ||||||
|          map.fitBounds(bounds, {paddingTopLeft: [getSidebarWidth(), 0]}) |          map.fitBounds(bounds, {paddingTopLeft: [getSidebarWidth(), 0]}) | ||||||
|          m.openPopup(bounds.getCenter()) |          m.openPopup(bounds.getCenter()) | ||||||
|        } |        } | ||||||
|   }); |   }) | ||||||
| 
 | 
 | ||||||
|   return funcDict |   return funcDict | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Nils Schneider
				Nils Schneider