Simplified map SVG
This commit is contained in:
parent
5087ab54e1
commit
1e5616257f
1 changed files with 9 additions and 14 deletions
|
@ -1,29 +1,24 @@
|
|||
module Views.Map exposing (..)
|
||||
|
||||
import GLOBALS exposing (backgroundColor, playAreaSize)
|
||||
import Svg exposing (Svg, g, path)
|
||||
import Svg.Attributes exposing (d, fill)
|
||||
import Svg exposing (Svg, g, path, rect)
|
||||
import Svg.Attributes exposing (d, fill, x, y, width, height)
|
||||
import Svg.Path exposing (pathToString, lineTo, subpath, startAt, closed)
|
||||
|
||||
|
||||
render : Svg msg
|
||||
render =
|
||||
let
|
||||
( width, height ) =
|
||||
( areaWidth, areaHeight ) =
|
||||
playAreaSize
|
||||
in
|
||||
g []
|
||||
[ path
|
||||
[ d <|
|
||||
pathToString
|
||||
[ subpath (startAt ( 0, 0 ))
|
||||
closed
|
||||
[ lineTo ( width, 0 )
|
||||
, lineTo ( width, height )
|
||||
, lineTo ( 0, height )
|
||||
]
|
||||
]
|
||||
, fill backgroundColor
|
||||
[ rect
|
||||
[ fill backgroundColor
|
||||
, width (toString areaWidth)
|
||||
, height (toString areaHeight)
|
||||
, x (toString 0)
|
||||
, y (toString 0)
|
||||
]
|
||||
[]
|
||||
]
|
||||
|
|
Loading…
Reference in a new issue