From ce643f5a787b4cee5f11b4a585cb6d754abcf154 Mon Sep 17 00:00:00 2001
From: "Aamon P. Hoffmann" <aamon.hoffmann@student.uni-halle.de>
Date: Mon, 6 Jan 2025 18:03:05 +0100
Subject: [PATCH] small node size changes

---
 src/Main.elm                     | 38 ++++++++++++++++++++++----------
 src/Views/ForceDirectedGraph.elm | 13 +++++------
 2 files changed, 32 insertions(+), 19 deletions(-)

diff --git a/src/Main.elm b/src/Main.elm
index 8b631c5..9fae85d 100644
--- a/src/Main.elm
+++ b/src/Main.elm
@@ -157,10 +157,12 @@ update msg ( global, local ) =
 
 -- VIEW
 
+
 icon : Html Msg
 icon =
     i [ Html.Attributes.class "fa-solid fa-house fa-xl" ] []
 
+
 viewNav : Model -> Html Msg
 viewNav ( global, _ ) =
     let
@@ -175,31 +177,43 @@ viewNav ( global, _ ) =
     nav [ Html.Attributes.class "navbar" ]
         [ button
             [ Html.Attributes.title "Home"
-            , activeClass Home |> Html.Attributes.class, ViewChange Home |> onClick
-            ] [ icon ]
+            , activeClass Home |> Html.Attributes.class
+            , ViewChange Home |> onClick
+            ]
+            [ icon ]
         , div [ Html.Attributes.class "navbar-title" ]
             [ text "Schengen Visa Statistics" ]
         , div [ Html.Attributes.class "navbar-view-icons" ]
             [ button
                 [ Html.Attributes.title "Map"
-                , activeClass MapView |> Html.Attributes.class, ViewChange MapView |> onClick
-                ] [ MapView.icon ]
+                , activeClass MapView |> Html.Attributes.class
+                , ViewChange MapView |> onClick
+                ]
+                [ MapView.icon ]
             , button
                 [ Html.Attributes.title "Force"
-                , activeClass ForceDirectedGraph |> Html.Attributes.class, ViewChange ForceDirectedGraph |> onClick
-                ] [ ForceDirectedGraphView.icon ]
+                , activeClass ForceDirectedGraph |> Html.Attributes.class
+                , ViewChange ForceDirectedGraph |> onClick
+                ]
+                [ ForceDirectedGraphView.icon ]
             , button
                 [ Html.Attributes.title "BarPlot"
-                , activeClass BarPlot |> Html.Attributes.class, ViewChange BarPlot |> onClick
-                ] [ BarPlotView.icon ]
+                , activeClass BarPlot |> Html.Attributes.class
+                , ViewChange BarPlot |> onClick
+                ]
+                [ BarPlotView.icon ]
             , button
                 [ Html.Attributes.title "LinePlot"
-                , activeClass LinePlot |> Html.Attributes.class, ViewChange LinePlot |> onClick
-                ] [ LinePlotView.icon ]
+                , activeClass LinePlot |> Html.Attributes.class
+                , ViewChange LinePlot |> onClick
+                ]
+                [ LinePlotView.icon ]
             , button
                 [ Html.Attributes.title "Table"
-                , activeClass DataTable |> Html.Attributes.class, ViewChange DataTable |> onClick
-                ] [ DataTableView.icon ]
+                , activeClass DataTable |> Html.Attributes.class
+                , ViewChange DataTable |> onClick
+                ]
+                [ DataTableView.icon ]
             ]
         ]
 
diff --git a/src/Views/ForceDirectedGraph.elm b/src/Views/ForceDirectedGraph.elm
index 8d28287..aa95bb7 100644
--- a/src/Views/ForceDirectedGraph.elm
+++ b/src/Views/ForceDirectedGraph.elm
@@ -527,15 +527,14 @@ nodeElement local dat node =
                 |> List.map (\e -> Maybe.withDefault 1 <| e.totalVisasApplied)
                 |> List.sum
 
-        baseFontSize =
-            15 + visasApplied / 1000000
-
         highlightFontSize =
-            if local.highlight == node.label.value then
-                2 * baseFontSize
+            15 + visasApplied / 900000
+                + (if List.member node.label.value countryNames then
+                    5
 
-            else
-                baseFontSize
+                   else
+                    0
+                  )
     in
     g []
         [ text_
-- 
GitLab