diff options
Diffstat (limited to 'Map/Business/RenderableMap.swift')
| -rw-r--r-- | Map/Business/RenderableMap.swift | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/Map/Business/RenderableMap.swift b/Map/Business/RenderableMap.swift index 82acaff..eeddb8b 100644 --- a/Map/Business/RenderableMap.swift +++ b/Map/Business/RenderableMap.swift @@ -39,18 +39,19 @@ struct RenderableMap { // Build a vertex lookup for edges, groups, etc. var vertexMap: [String: Vertex] = [:] - + for (index, component) in map.components.enumerated() { let newVertex = Vertex( id: index, label: component.label, - position: CGPoint(x: component.coordinates.xCoordinate, y: component.coordinates.yCoordinate), + position: CGPoint( + x: component.coordinates.xCoordinate, y: component.coordinates.yCoordinate), shape: component.shape ) vertices.append(newVertex) vertexMap[component.label.lowercased()] = newVertex } - + for (index, note) in map.notes.enumerated() { notes.append( Note( @@ -70,8 +71,7 @@ struct RenderableMap { // Second pass for entities that depend on vertices for (index, dependency) in map.dependencies.enumerated() { if let fromVertex = vertexMap[dependency.fromComponent.lowercased()], - let toVertex = vertexMap[dependency.toComponent.lowercased()] - { + let toVertex = vertexMap[dependency.toComponent.lowercased()] { edges.append( MapEdge( id: index, @@ -81,7 +81,7 @@ struct RenderableMap { )) } } - + for (index, inertia) in map.inertias.enumerated() { if let vertex = vertexMap[inertia.component.lowercased()] { inertias.append( @@ -91,7 +91,7 @@ struct RenderableMap { )) } } - + for (index, evolution) in map.evolutions.enumerated() { if let vertex = vertexMap[evolution.component.lowercased()] { let destination = CGPoint( @@ -106,7 +106,7 @@ struct RenderableMap { )) } } - + for group in map.groups { var groupVertices: [Vertex] = [] for componentName in group.components { @@ -174,5 +174,5 @@ struct Opportunity { private let defaultDimensions: [Double] = [ 25.0, 50.0, - 75.0, + 75.0 ] |