Your subscriptions also take model as input, so you could do something like
this:
subscriptions : Model -> Sub Msg
subscriptions model =
if model.followMouse then
Mouse.moves MyMsg
else
Sub.none
You could look at the drag-and-drop example elm-lang.org examples to see
how conditional subscriptions work.
--
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 [email protected].
For more options, visit https://groups.google.com/d/optout.