aboutsummaryrefslogtreecommitdiff
path: root/Map/Business/RenderableMap.swift
diff options
context:
space:
mode:
authorRuben Beltran del Rio <jj@r.bdr.sh>2025-12-15 00:11:21 +0100
committerRuben Beltran del Rio <jj@r.bdr.sh>2025-12-15 00:19:39 +0100
commitfa681bfcf5cbfcc711fb0ab10f3fd74ac83bf18c (patch)
tree2dce2e95bab08f773246b450ac50227f8e8f57da /Map/Business/RenderableMap.swift
parent0d5e6636405dbe332c33c0fb82c7ccccb20f96cb (diff)
Apply formatting rules
Diffstat (limited to 'Map/Business/RenderableMap.swift')
-rw-r--r--Map/Business/RenderableMap.swift18
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
]