File tree Expand file tree Collapse file tree 4 files changed +160
-2
lines changed
render-tests/line-opacity/data-driven Expand file tree Collapse file tree 4 files changed +160
-2
lines changed Original file line number Diff line number Diff line change @@ -155,8 +155,7 @@ const lineDefinesValues = (layer: LineStyleLayer): LineDefinesType[] => {
155155
156156 const hasPattern = layer . paint . get ( 'line-pattern' ) . constantOr ( ( 1 : any ) ) ;
157157 const hasOpacity = layer . paint . get ( 'line-opacity' ) . constantOr ( 1.0 ) !== 1.0 ;
158- const hasWidthOver1 = layer . paint . get ( 'line-width' ) . constantOr ( 1.0 ) > 1.0 ;
159- if ( ! hasPattern && hasWidthOver1 && hasOpacity ) {
158+ if ( ! hasPattern && hasOpacity ) {
160159 values . push ( 'RENDER_LINE_ALPHA_DISCARD' ) ;
161160 }
162161 return values ;
Original file line number Diff line number Diff line change 1+ {
2+ "version" : 8 ,
3+ "metadata" : {
4+ "test" : {
5+ "width" : 512 ,
6+ "height" : 512
7+ }
8+ },
9+ "sources" : {
10+ "mapbox" : {
11+ "type" : " vector" ,
12+ "maxzoom" : 18 ,
13+ "tiles" : [
14+ " local://tiles/{z}-{x}-{y}.mvt"
15+ ]
16+ }
17+ },
18+ "layers" : [
19+ {
20+ "id" : " data-driven-lines" ,
21+ "type" : " line" ,
22+ "source" : " mapbox" ,
23+ "source-layer" : " road" ,
24+ "filter" : [
25+ " has" ,
26+ " type"
27+ ],
28+ "layout" : {
29+ "line-join" : " round"
30+ },
31+ "paint" : {
32+ "line-color" : [
33+ " interpolate" ,
34+ [
35+ " linear"
36+ ],
37+ [
38+ " zoom"
39+ ],
40+ 1 ,
41+ [
42+ " match" ,
43+ [
44+ " get" ,
45+ " type"
46+ ],
47+ [
48+ " light_rail" ,
49+ " monorail" ,
50+ " rail"
51+ ],
52+ " hsl(255, 82%, 42%)" ,
53+ " subway" ,
54+ " hsl(360, 93%, 50%)" ,
55+ " hsla(0, 0%, 0%, 0)"
56+ ],
57+ 8 ,
58+ [
59+ " match" ,
60+ [
61+ " get" ,
62+ " type"
63+ ],
64+ [
65+ " light_rail" ,
66+ " monorail" ,
67+ " rail"
68+ ],
69+ " hsl(255, 82%, 42%)" ,
70+ " subway" ,
71+ " hsl(360, 93%, 50%)" ,
72+ " #000000"
73+ ]
74+ ],
75+ "line-opacity" : 0.6 ,
76+ "line-width" : [
77+ " interpolate" ,
78+ [
79+ " linear"
80+ ],
81+ [
82+ " zoom"
83+ ],
84+ 0 ,
85+ [
86+ " *" ,
87+ [
88+ " match" ,
89+ [
90+ " get" ,
91+ " type"
92+ ],
93+ " platform" ,
94+ 0.5 ,
95+ [
96+ " rail" ,
97+ " monorail" ,
98+ " light_rail" ,
99+ " subway"
100+ ],
101+ 3 ,
102+ 0
103+ ],
104+ 1.4
105+ ],
106+ 3 ,
107+ [
108+ " *" ,
109+ [
110+ " match" ,
111+ [
112+ " get" ,
113+ " type"
114+ ],
115+ " platform" ,
116+ 0.5 ,
117+ [
118+ " rail" ,
119+ " monorail" ,
120+ " light_rail" ,
121+ " subway"
122+ ],
123+ 3 ,
124+ 0
125+ ],
126+ 1.4
127+ ],
128+ 22 ,
129+ [
130+ " *" ,
131+ [
132+ " match" ,
133+ [
134+ " get" ,
135+ " type"
136+ ],
137+ " platform" ,
138+ 0.5 ,
139+ [
140+ " rail" ,
141+ " monorail" ,
142+ " light_rail" ,
143+ " subway"
144+ ],
145+ 3 ,
146+ 0
147+ ],
148+ 1.4
149+ ]
150+ ]
151+ }
152+ }
153+ ],
154+ "center" : [
155+ -74.001215 ,
156+ 40.753458
157+ ],
158+ "zoom" : 16.5
159+ }
You can’t perform that action at this time.
0 commit comments