Skip to content

Commit

Permalink
Improve svgtiler.background docs
Browse files Browse the repository at this point in the history
  • Loading branch information
edemaine committed Oct 13, 2022
1 parent f82fbe9 commit 627de5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ The top-level code of your .js or .coffee mapping file can also call:
overall size of the rendered drawing.
* `svgtiler.background(fillColor)` to set the default background color
for the SVG drawing (implemented via a `<rect>` underneath the bounding box).
Equivalent to
When used called more than once, only the final background color gets
rendered. When used only once, equivalent to
`svgtiler.postprocess((render) => render.add(<rect z-index="-Infinity" fill={fillColor} x={render.xMin} y={render.yMin} width={render.width} height={render.height}/>))`.
You can also call `svgtiler.background` within a tile definition function or
a `preprocess`/`postprocess` callback to set the background dynamically,
Expand Down

0 comments on commit 627de5c

Please sign in to comment.