I am facing issue in taking Int
value out of Window.dimensions
's return val - Signal Int
.
view : Signal.Address Action -> Model -> Html
view address model =
let wx = Signal.map fst Window.dimensions
wy = Signal.map snd Window.dimensions
in fromElement <| container wx wy middle <| toElement 100 100 <|
div []
[ button [ onClick address Decrement ] [text "-"]
]
This line, wx = Signal.map fst Window.dimensions
to get window
container x-coordinates throws error as,
Type mismatch between the following types on line 30, column 31 to 33:
Signal.Signal In
Int
It is related to the following expression:
wx