" ... If an update comes on both signals at the same time, the left update wins. ..."
type Update = MouseDown Bool | TimeDelta Float
updates : Signal Update
updates =
merge
(map TimeDelta (fps 1000)) -- One would never do this
(map MouseDown Mouse.isDown)
--
You received this message because you are subscribed to the Google Groups "Elm Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elm-discuss...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
type Update = MouseDown Bool | MouseMove (Int, Int)
updates : Signal Update
updates =
merge
(map Mouse.position)
(map MouseDown Mouse.isDown)
merge
(map MouseMove Mouse.position)
(map MouseDown Mouse.isDown)