git.iko.soy/typeable/elm-ui
on master help sign in
nearby Element.none now skips the attribute entirely.
6d40474Matthew Griffith
src/Element.elm+20−6
@@ -1226,28 +1226,42 @@ downloadAs attrs { url, filename, label } =
1226 (Internal.Unkeyed [ label ])
1226 (Internal.Unkeyed [ label ])
1227
1227
1228
1228
1229+
1230+{- NEARBYS -}
1231+
1232+
1233+createNearby : Internal.Location -> Element msg -> Attribute msg
1234+createNearby loc element =
1235+ case element of
1236+ Internl.Empty ->
1237+ Internal.NoAttribute
1238+
1239+ _ ->
1240+ Internal.Nearby loc element
1241+
1242+
1229{-| -}
1243{-| -}
1230below : Element msg -> Attribute msg
1244below : Element msg -> Attribute msg
1231below element =
1245below element =
1232− Internal.Nearby Internal.Below element
1246+ createNearby Internal.Below element
1233
1247
1234
1248
1235{-| -}
1249{-| -}
1236above : Element msg -> Attribute msg
1250above : Element msg -> Attribute msg
1237above element =
1251above element =
1238− Internal.Nearby Internal.Above element
1252+ createNearby Internal.Above element
1239
1253
1240
1254
1241{-| -}
1255{-| -}
1242onRight : Element msg -> Attribute msg
1256onRight : Element msg -> Attribute msg
1243onRight element =
1257onRight element =
1244− Internal.Nearby Internal.OnRight element
1258+ createNearby Internal.OnRight element
1245
1259
1246
1260
1247{-| -}
1261{-| -}
1248onLeft : Element msg -> Attribute msg
1262onLeft : Element msg -> Attribute msg
1249onLeft element =
1263onLeft element =
1250− Internal.Nearby Internal.OnLeft element
1264+ createNearby Internal.OnLeft element
1251
1265
1252
1266
1253{-| This will place an element in front of another.
1267{-| This will place an element in front of another.
@@ -1257,14 +1271,14 @@ onLeft element =
1257-}
1271-}
1258inFront : Element msg -> Attribute msg
1272inFront : Element msg -> Attribute msg
1259inFront element =
1273inFront element =
1260− Internal.Nearby Internal.InFront element
1274+ createNearby Internal.InFront element
1261
1275
1262
1276
1263{-| This will place an element between the background and the content of an element.
1277{-| This will place an element between the background and the content of an element.
1264-}
1278-}
1265behindContent : Element msg -> Attribute msg
1279behindContent : Element msg -> Attribute msg
1266behindContent element =
1280behindContent element =
1267− Internal.Nearby Internal.Behind element
1281+ createNearby Internal.Behind element
1268
1282
1269
1283
1270{-| -}
1284{-| -}