forked from MapComplete/MapComplete
		
	Refactoring: split 'Utils' into multiple files; fix some stray uppercase-method names
This commit is contained in:
		
							parent
							
								
									81be4db044
								
							
						
					
					
						commit
						3ec89826e4
					
				
					 97 changed files with 884 additions and 921 deletions
				
			
		|  | @ -13,6 +13,7 @@ import { Utils } from "../../../Utils" | |||
| import { OsmConnection } from "../OsmConnection" | ||||
| import { Feature, Geometry, LineString, Point } from "geojson" | ||||
| import FullNodeDatabaseSource from "../../FeatureSource/TiledFeatureSource/FullNodeDatabaseSource" | ||||
| import { Lists } from "../../../Utils/Lists" | ||||
| 
 | ||||
| export default class ReplaceGeometryAction extends OsmChangeAction implements PreviewableAction { | ||||
|     /** | ||||
|  | @ -164,7 +165,7 @@ export default class ReplaceGeometryAction extends OsmChangeAction implements Pr | |||
|             preview.push(feature) | ||||
|         }) | ||||
| 
 | ||||
|         return StaticFeatureSource.fromGeojson(Utils.NoNull(preview)) | ||||
|         return StaticFeatureSource.fromGeojson(Lists.noNull(preview)) | ||||
|     } | ||||
| 
 | ||||
|     /** | ||||
|  | @ -317,7 +318,7 @@ export default class ReplaceGeometryAction extends OsmChangeAction implements Pr | |||
|                 candidate = undefined | ||||
|                 moveDistance = Infinity | ||||
|                 distances.forEach((distances, nodeId) => { | ||||
|                     const minDist = Math.min(...Utils.NoNull(distances)) | ||||
|                     const minDist = Math.min(...(Lists.noNull(distances))) | ||||
|                     if (moveDistance > minDist) { | ||||
|                         // We have found a candidate to move
 | ||||
|                         candidate = nodeId | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue