Cadel Watson hai 1 ano
pai
achega
1016201ee8
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      src/Main.elm

+ 2 - 0
src/Main.elm

@@ -114,6 +114,8 @@ viewDraft draft =
             List.map (\c -> viewKeyedCard (chosen.name == c.name) c)
                 (Zipper.focus draft).available
     in
+    -- Making this a keyed node forces Elm to recreate each card when the card name changes,
+    -- so the old image doesn't hang around during loading of the new card image
     Keyed.node "div"
         [ class "grid grid-cols-8 w-100 gap-6" ]
         picks