souplesse/frontend/src/Model.elm

27 lines
572 B
Elm
Raw Normal View History

2024-11-23 16:41:04 +00:00
module Model exposing
(
Model
, TrackState(..)
, Drag(..)
, DragTarget(..)
)
import TileMap exposing (ZoomLevel, Coord)
2024-11-23 16:41:04 +00:00
import Point exposing (Point)
type DragTarget = Map | Graph | StartMark | EndMark | NoTarget
type Drag
= None
| Dragging DragTarget (Int, Int) (Int, Int)
type TrackState = Empty | Loading | Failure String | Present (List Point)
type alias Model =
{ centre: Coord
, zoom: ZoomLevel
2024-11-23 16:41:04 +00:00
, drag: Drag
, startTime : Float
, duration : Float
, markedTime : (Float, Float)
, track: TrackState }