diff options
author | Joris | 2017-03-24 09:21:04 +0000 |
---|---|---|
committer | Joris | 2017-03-24 09:21:04 +0000 |
commit | cfca18262c1ff48dcb683ddab7d03cf8e55573ff (patch) | |
tree | 8a438430cee7411259fc395d8f3898488e85d750 /src/client/elm/Model/Size.elm | |
parent | 293eb8295162bf0a038f488237db9c9d1316c04d (diff) |
Features/categories
Diffstat (limited to 'src/client/elm/Model/Size.elm')
-rw-r--r-- | src/client/elm/Model/Size.elm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client/elm/Model/Size.elm b/src/client/elm/Model/Size.elm index b29e90b..f40fb01 100644 --- a/src/client/elm/Model/Size.elm +++ b/src/client/elm/Model/Size.elm @@ -3,15 +3,15 @@ module Model.Size exposing , sizeDecoder ) -import Json.Decode as Json exposing ((:=)) +import Json.Decode as Decode exposing (Decoder) type alias Size = { width: Int , height: Int } -sizeDecoder : Json.Decoder Size +sizeDecoder : Decoder Size sizeDecoder = - Json.object2 Size - ("width" := Json.int) - ("height" := Json.int) + Decode.map2 Size + (Decode.field "width" Decode.int) + (Decode.field "height" Decode.int) |