Skip to content

Commit abb78be

Browse files
JIghtusegithub-actions[bot]
authored andcommitted
Fixes for placements with optional- and missing parts
GitOrigin-RevId: 6deafebe621e77dd74a2d045318081e2eb1dcd44
1 parent f97ea5e commit abb78be

File tree

9 files changed

+194
-1
lines changed

9 files changed

+194
-1
lines changed

test/ignores/all.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ const skip = [
243243
"render-tests/background-pattern/image-update/delayed/different-size-with-color-theme",
244244

245245
// https://mapbox.atlassian.net/browse/GLJS-1295
246-
"render-tests/placement/icon-optional",
246+
"render-tests/placement/icon-optional/basic",
247247
"render-tests/placement/text-optional/basic",
248248
"render-tests/placement/text-optional/text-variable-anchor",
249249
// limit number of holes experimental for native

test/integration/render-tests/placement/icon-optional/expected.png renamed to test/integration/render-tests/placement/icon-optional/basic/expected.png

File renamed without changes.

test/integration/render-tests/placement/icon-optional/style.json renamed to test/integration/render-tests/placement/icon-optional/basic/style.json

File renamed without changes.
3.85 KB
Loading
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
{
2+
"version": 8,
3+
"metadata": {
4+
"test": {
5+
"width": 256,
6+
"height": 256
7+
}
8+
},
9+
"zoom": 2,
10+
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
11+
"sprite": "local://sprites/sprite",
12+
"sources": {
13+
"test": {
14+
"type": "geojson",
15+
"data": {
16+
"type": "FeatureCollection",
17+
"features": [
18+
{
19+
"type": "Feature",
20+
"geometry": {
21+
"type": "Point",
22+
"coordinates": [-5, 5]
23+
}
24+
},
25+
{
26+
"type": "Feature",
27+
"geometry": {
28+
"type": "Point",
29+
"coordinates": [5, 0]
30+
}
31+
},
32+
{
33+
"type": "Feature",
34+
"geometry": {
35+
"type": "Point",
36+
"coordinates": [-5, -5]
37+
}
38+
}
39+
]
40+
}
41+
}
42+
},
43+
"layers": [
44+
{
45+
"id": "background",
46+
"type": "background",
47+
"paint": {
48+
"background-color": "white"
49+
}
50+
},
51+
{
52+
"id": "test",
53+
"type": "symbol",
54+
"source": "test",
55+
"layout": {
56+
"icon-image": "building-12",
57+
"icon-optional": true,
58+
"icon-allow-overlap": true,
59+
"icon-anchor": "bottom"
60+
}
61+
}
62+
]
63+
}
5.05 KB
Loading
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"version": 8,
3+
"metadata": {
4+
"test": {
5+
"width": 256,
6+
"height": 256
7+
}
8+
},
9+
"zoom": 2,
10+
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
11+
"sources": {
12+
"test": {
13+
"type": "geojson",
14+
"data": {
15+
"type": "FeatureCollection",
16+
"features": [
17+
{
18+
"type": "Feature",
19+
"geometry": {
20+
"type": "Point",
21+
"coordinates": [-3, 5]
22+
}
23+
},
24+
{
25+
"type": "Feature",
26+
"geometry": {
27+
"type": "Point",
28+
"coordinates": [3, 0]
29+
}
30+
},
31+
{
32+
"type": "Feature",
33+
"geometry": {
34+
"type": "Point",
35+
"coordinates": [2, 0]
36+
}
37+
}
38+
]
39+
}
40+
}
41+
},
42+
"layers": [
43+
{
44+
"id": "background",
45+
"type": "background",
46+
"paint": {
47+
"background-color": "white"
48+
}
49+
},
50+
{
51+
"id": "test",
52+
"type": "symbol",
53+
"source": "test",
54+
"layout": {
55+
"text-field": "Some text",
56+
"text-optional": true,
57+
"text-font": [
58+
"Open Sans Semibold",
59+
"Arial Unicode MS Bold"
60+
],
61+
"text-variable-anchor": ["left", "right"]
62+
}
63+
}
64+
]
65+
}
6.83 KB
Loading
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"version": 8,
3+
"metadata": {
4+
"test": {
5+
"width": 256,
6+
"height": 256
7+
}
8+
},
9+
"zoom": 2,
10+
"glyphs": "local://glyphs/{fontstack}/{range}.pbf",
11+
"sources": {
12+
"test": {
13+
"type": "geojson",
14+
"data": {
15+
"type": "FeatureCollection",
16+
"features": [
17+
{
18+
"type": "Feature",
19+
"geometry": {
20+
"type": "Point",
21+
"coordinates": [-5, 5]
22+
}
23+
},
24+
{
25+
"type": "Feature",
26+
"geometry": {
27+
"type": "Point",
28+
"coordinates": [5, 0]
29+
}
30+
},
31+
{
32+
"type": "Feature",
33+
"geometry": {
34+
"type": "Point",
35+
"coordinates": [-5, -5]
36+
}
37+
}
38+
]
39+
}
40+
}
41+
},
42+
"layers": [
43+
{
44+
"id": "background",
45+
"type": "background",
46+
"paint": {
47+
"background-color": "white"
48+
}
49+
},
50+
{
51+
"id": "test",
52+
"type": "symbol",
53+
"source": "test",
54+
"layout": {
55+
"text-field": "Some long text",
56+
"text-optional": true,
57+
"text-font": [
58+
"Open Sans Semibold",
59+
"Arial Unicode MS Bold"
60+
],
61+
"text-anchor": "top"
62+
}
63+
}
64+
]
65+
}

0 commit comments

Comments
 (0)