Skip to content

Commit

Permalink
Add regression test for circle stroke (#4291)
Browse files Browse the repository at this point in the history
This adds a test that checks that if a circle has a visible stroke, the representation of the stroke is still visible even if:

* The circle itself has a clear color
* The circle itself has a circle-opacity of 0
* The circle itself has a radius of 0
  • Loading branch information
boundsj authored and jfirebaugh committed Feb 17, 2017
1 parent 3395b10 commit fd73395
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 0 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"version": 8,
"metadata": {
"test": {
"width": 64,
"height": 64
}
},
"sources": {
"sourceOne": {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"id": "a",
"geometry": {
"type": "Point",
"coordinates": [
-10,
0
]
}
}
]
}
},
"sourceTwo": {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"id": "a",
"geometry": {
"type": "Point",
"coordinates": [
10,
0
]
}
}
]
}
},
"sourceThree": {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {},
"id": "a",
"geometry": {
"type": "Point",
"coordinates": [
0,
-10
]
}
}
]
}
}
},
"layers": [
{
"id": "circleOne",
"type": "circle",
"source": "sourceOne",
"paint": {
"circle-color": "rgba(0,0,0,0)",
"circle-radius": 10,
"circle-stroke-color": "blue",
"circle-stroke-width": 2
}
},
{
"id": "circleTwo",
"type": "circle",
"source": "sourceTwo",
"paint": {
"circle-opacity": 0,
"circle-radius": 10,
"circle-stroke-color": "red",
"circle-stroke-width": 2
}
},
{
"id": "circleThree",
"type": "circle",
"source": "sourceThree",
"paint": {
"circle-radius": 0,
"circle-stroke-color": "green",
"circle-stroke-width": 2
}
}
]
}

0 comments on commit fd73395

Please sign in to comment.