aboutsummaryrefslogtreecommitdiff
path: root/src/client/Model/Size.elm
blob: f40fb01dcf58005d0b0ea7ea92797ac8d43eabd5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
module Model.Size exposing
  ( Size
  , sizeDecoder
  )

import Json.Decode as Decode exposing (Decoder)

type alias Size =
  { width: Int
  , height: Int
  }

sizeDecoder : Decoder Size
sizeDecoder =
  Decode.map2 Size
    (Decode.field "width" Decode.int)
    (Decode.field "height" Decode.int)