souplesse/frontend/src/Model.elm

26 lines
588 B
Elm
Raw Normal View History

2024-11-23 16:41:04 +00:00
module Model exposing
(
Model
, TrackState(..)
, DragState(..)
2024-11-23 16:41:04 +00:00
)
import TileMap exposing (ZoomLevel, Coord)
2024-11-23 16:41:04 +00:00
import Point exposing (Point)
type DragState =
DragMap (Int, Int) Coord
| DragGraph (Int, Int) Float
| DragLeftMark (Int, Int) (Float, Float)
| DragRightMark (Int, Int) Float
2024-11-23 16:41:04 +00:00
type TrackState = Empty | Loading | Failure String | Present (List Point)
type alias Model =
{ centre: Coord
, zoom: ZoomLevel
, drag: Maybe DragState
2024-11-23 16:41:04 +00:00
, startTime : Float
, duration : Float
, markedTime : (Float, Float)
, track: TrackState }