module Model exposing ( Model , TrackState(..) , DragState(..) , empty ) import TileMap exposing (ZoomLevel(..), Coord, toCoord) import Point exposing (Point) import Pos exposing (Pos) type DragState = DragMap (Int, Int) Coord | DragGraph (Int, Int) Float | DragLeftMark (Int, Int) Float | DragRightMark (Int, Int) Float type TrackState = Empty | Loading | Failure String | Present (List Point) type alias Model = { centre: Coord , zoom: ZoomLevel , drag: Maybe DragState , startTime : Float , duration : Float , leftMark : Float , rightMark : Float , track: TrackState } empty = Model (toCoord (Pos 0 0 Nothing)) (ZoomLevel 0) Nothing 0 0 0 0 Loading