Skip to content

Commit b409ec9

Browse files
authored
Add render test for setting line-gradient style property at runtime (#10988)
Render test verifies fix for regression introduced in gl-native
1 parent de23e8a commit b409ec9

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed
801 Bytes
Loading
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"version": 8,
3+
"metadata": {
4+
"test": {
5+
"width": 64,
6+
"height": 64,
7+
"operations": [
8+
["wait", 100],
9+
["setPaintProperty", "line", "line-gradient", [
10+
"interpolate",
11+
["linear"],
12+
["line-progress"],
13+
0, "rgba(255, 0, 0, 0.5)",
14+
0.1, "lime",
15+
0.3, "cyan",
16+
0.5, "royalblue",
17+
0.7, "yellow",
18+
1, "red"
19+
]
20+
],
21+
["wait", 100]
22+
]
23+
}
24+
},
25+
"center": [
26+
-77.028035,
27+
38.890770
28+
],
29+
"zoom": 16,
30+
"sources": {
31+
"gradient": {
32+
"type": "geojson",
33+
"data": {
34+
"type": "Feature",
35+
"properties": {},
36+
"geometry": {
37+
"type": "LineString",
38+
"coordinates": [
39+
[-77.028035, 38.890600 ],
40+
[-77.028035, 38.890950 ]
41+
]
42+
}
43+
},
44+
"lineMetrics": true
45+
}
46+
},
47+
"layers": [
48+
{
49+
"id": "line",
50+
"type": "line",
51+
"source": "gradient",
52+
"layout": {
53+
"line-cap": "round",
54+
"line-join": "round"
55+
},
56+
"paint": {
57+
"line-width": 15,
58+
"line-color": "dodgerblue"
59+
}
60+
}
61+
]
62+
}

0 commit comments

Comments
 (0)