elm-graphics
elm-graphics copied to clipboard
Text rendering error in combination with `width`
The following program:
import Element exposing (..)
import Text exposing (fromString)
main =
fromString "hello" |> centered
|> width 200
|> toHtml
Gives the following error
Uncaught TypeError: Cannot read property 'arity' of undefined
Commenting the width line gets rid of the error.
This error is present for Text Elements. If the Text Element is replaced by a collage, the presence of width does not produce the error anymore.
For example, this works:
import Element exposing (..)
import Collage exposing (..)
import Color exposing (..)
main =
collage 20 20 [rect 10 10 |> filled red]
|> width 200
|> toHtml
👍 , ran into this myself, would like to see a fix. (I'd send a PR if history would lead me to believe that it would be merged in a timely fashion...)
I ran into this issue myself as well.
Ran into this too, but with height instead of width.
When I used width 800 etc. nothing is rendered. Removing it solves the issue. Height etc. all working fine.