aboutsummaryrefslogtreecommitdiff
path: root/src/client/elm/Model
diff options
context:
space:
mode:
authorJoris2016-06-28 00:32:37 +0200
committerJoris2016-06-29 20:34:05 +0200
commit071b07463ab3f6894928b13553e98cd47c9ccb18 (patch)
treefad6e7f6c8e9aa730f7c113868debc1812795cc9 /src/client/elm/Model
parentf605541cbaaa3c339eef8f345547bcd653d3f721 (diff)
Add tooltips
Diffstat (limited to 'src/client/elm/Model')
-rw-r--r--src/client/elm/Model/Size.elm17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/client/elm/Model/Size.elm b/src/client/elm/Model/Size.elm
new file mode 100644
index 0000000..b29e90b
--- /dev/null
+++ b/src/client/elm/Model/Size.elm
@@ -0,0 +1,17 @@
+module Model.Size exposing
+ ( Size
+ , sizeDecoder
+ )
+
+import Json.Decode as Json exposing ((:=))
+
+type alias Size =
+ { width: Int
+ , height: Int
+ }
+
+sizeDecoder : Json.Decoder Size
+sizeDecoder =
+ Json.object2 Size
+ ("width" := Json.int)
+ ("height" := Json.int)