diff options
| author | Jakub Hampl <kopomir@gmail.com> | 2019-02-15 20:50:23 +0000 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-15 20:50:23 +0000 | 
| commit | 9bd079e10dfa68df2f2fec5adb35df90edb3525f (patch) | |
| tree | c65a4314629a043b1fe91dca0d56bbdcfb4c5dff /style-generator | |
| parent | 16f0d89d0f19c2d8bf1bad6c41383973d9ce1ad6 (diff) | |
Mapbox Upgrade + Simplified Enums (#9)4.0.0
Diffstat (limited to 'style-generator')
| -rw-r--r-- | style-generator/src/Decoder/Expression.elm | 70 | ||||
| -rw-r--r-- | style-generator/src/Main.elm | 4 | 
2 files changed, 38 insertions, 36 deletions
| diff --git a/style-generator/src/Decoder/Expression.elm b/style-generator/src/Decoder/Expression.elm index 137ab26..aa4dd87 100644 --- a/style-generator/src/Decoder/Expression.elm +++ b/style-generator/src/Decoder/Expression.elm @@ -35,88 +35,94 @@ decodeLiteral =  makeConstant s =      case s of          "map" -> -            Lib.eValue "anchorMap" +            Lib.eValue "map"          "viewport" -> -            Lib.eValue "anchorViewport" +            Lib.eValue "viewport"          "auto" -> -            Lib.eValue "anchorAuto" +            Lib.eValue "auto"          "center" -> -            Lib.eValue "positionCenter" +            Lib.eValue "center"          "left" -> -            Lib.eValue "positionLeft" +            Lib.eValue "left"          "right" -> -            Lib.eValue "positionRight" +            Lib.eValue "right"          "top" -> -            Lib.eValue "positionTop" +            Lib.eValue "top"          "bottom" -> -            Lib.eValue "positionBottom" +            Lib.eValue "bottom" -        "topRight" -> -            Lib.eValue "positionTopRight" +        "top-left" -> +            Lib.eValue "topLeft" -        "topLeft" -> -            Lib.eValue "positionTopLeft" +        "top-right" -> +            Lib.eValue "topRight" -        "bottomLeft" -> -            Lib.eValue "positionBottomLeft" +        "bottom-left" -> +            Lib.eValue "bottomLeft" -        "bottomRight" -> -            Lib.eValue "positionBottomRight" +        "bottom-right" -> +            Lib.eValue "bottomRight"          "none" -> -            Lib.eValue "textFitNone" +            Lib.eValue "none"          "width" -> -            Lib.eValue "textFitWidth" +            Lib.eValue "width"          "height" -> -            Lib.eValue "textFitHeight" +            Lib.eValue "height"          "both" -> -            Lib.eValue "textFitBoth" +            Lib.eValue "both"          "butt" -> -            Lib.eValue "lineCapButt" +            Lib.eValue "butt"          "round" -> -            Lib.eValue "lineCapRound" +            Lib.eValue "rounded"          "square" -> -            Lib.eValue "lineCapSquare" +            Lib.eValue "square"          "bevel" -> -            Lib.eValue "lineJoinBevel" +            Lib.eValue "bevel"          "miter" -> -            Lib.eValue "lineJoinMiter" +            Lib.eValue "miter"          "point" -> -            Lib.eValue "symbolPlacementPoint" +            Lib.eValue "point"          "line-center" -> -            Lib.eValue "symbolPlacementLineCenter" +            Lib.eValue "lineCenter"          "line" -> -            Lib.eValue "symbolPlacementLine" +            Lib.eValue "line"          "uppercase" -> -            Lib.eValue "textTransformUppercase" +            Lib.eValue "uppercase"          "lowercase" -> -            Lib.eValue "textTransformLowercase" +            Lib.eValue "lowercase"          "linear" -> -            Lib.eValue "rasterResamplingLinear" +            Lib.eValue "linear"          "nearest" -> -            Lib.eValue "rasterResamplingNearest" +            Lib.eValue "nearest" + +        "viewport-y" -> +            Lib.eValue "viewportY" + +        "source" -> +            Lib.eValue "source"          _ ->              case Color.parse s of diff --git a/style-generator/src/Main.elm b/style-generator/src/Main.elm index 3b1a153..fe07bc4 100644 --- a/style-generator/src/Main.elm +++ b/style-generator/src/Main.elm @@ -203,10 +203,6 @@ results attrs model =                      , Element.paragraph [] [ Element.text "In Studio, hit the share button. This will give you the style url and token. This tool will attempt to generate an elm-mapbox style for you. It is not perfect, but should give a nice head-start. Try to compile the file and see if you get any errors." ]                      , Element.paragraph []                          [ text "There are a few common limitations that are relatively easy to fix with some grepping. For example, " -                        , code "Layer.lineJoin E.lineCapRound" -                        , text " should be replaced by " -                        , code "Layer.lineJoin E.lineJoinRound" -                        , text ". Also "                          , code "Layer.textField"                          , text " is often followed by "                          , code "E.toString" | 
