aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick Sier <pjsier@users.noreply.github.com>2019-08-13 03:40:17 -0500
committerJakub Hampl <kopomir@gmail.com>2019-08-13 09:40:17 +0100
commitc3496315f52ae90c9c86a2d72dd8690db67dbd04 (patch)
tree4dc046b7d0f4da9745dccd8cb898500eec598c4a /src
parent09249b8f3e88e70fc78a7d1f8b91e89c5962661b (diff)
Uses Bool instead of Expression for visibility (#51)
Diffstat (limited to 'src')
-rw-r--r--src/Mapbox/Layer.elm6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Mapbox/Layer.elm b/src/Mapbox/Layer.elm
index dea484c..2c24fb5 100644
--- a/src/Mapbox/Layer.elm
+++ b/src/Mapbox/Layer.elm
@@ -319,9 +319,9 @@ filter =
{-| Whether this layer is displayed.
-}
-visible : Expression CameraExpression Bool -> LayerAttr any
-visible vis =
- Layout "visibility" <| Expression.encode <| Expression.ifElse vis (Expression.str "visible") (Expression.str "none")
+visible : Bool -> LayerAttr any
+visible isVisible =
+ Layout "visibility" <| Expression.encode <| Expression.str <| if isVisible then "visible" else "none"