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 (..)
|
module Views.Map exposing (..)
|
||||||
|
|
||||||
import GLOBALS exposing (backgroundColor, playAreaSize)
|
import GLOBALS exposing (backgroundColor, playAreaSize)
|
||||||
import Svg exposing (Svg, g, path)
|
import Svg exposing (Svg, g, path, rect)
|
||||||
import Svg.Attributes exposing (d, fill)
|
import Svg.Attributes exposing (d, fill, x, y, width, height)
|
||||||
import Svg.Path exposing (pathToString, lineTo, subpath, startAt, closed)
|
import Svg.Path exposing (pathToString, lineTo, subpath, startAt, closed)
|
||||||
|
|
||||||
|
|
||||||
render : Svg msg
|
render : Svg msg
|
||||||
render =
|
render =
|
||||||
let
|
let
|
||||||
( width, height ) =
|
( areaWidth, areaHeight ) =
|
||||||
playAreaSize
|
playAreaSize
|
||||||
in
|
in
|
||||||
g []
|
g []
|
||||||
[ path
|
[ rect
|
||||||
[ d <|
|
[ fill backgroundColor
|
||||||
pathToString
|
, width (toString areaWidth)
|
||||||
[ subpath (startAt ( 0, 0 ))
|
, height (toString areaHeight)
|
||||||
closed
|
, x (toString 0)
|
||||||
[ lineTo ( width, 0 )
|
, y (toString 0)
|
||||||
, lineTo ( width, height )
|
|
||||||
, lineTo ( 0, height )
|
|
||||||
]
|
|
||||||
]
|
|
||||||
, fill backgroundColor
|
|
||||||
]
|
]
|
||||||
[]
|
[]
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue