File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1706,17 +1706,24 @@ export abstract class RendererBase {
17061706 throw new Error ( "The `flood` marker can only be used if polygons are passed to the marking code." ) ;
17071707 }
17081708 let isGradient = false ;
1709+ let isFlatten = false ;
17091710 let colour : string | SVGGradient = this . options . colourContext . fill ;
17101711 if ( ( "colour" in marker ) && ( marker . colour !== undefined ) ) {
17111712 if ( typeof marker . colour === "object" && ( "stops" in marker . colour ) ) {
17121713 isGradient = true ;
1714+ } else if ( typeof marker . colour === "object" && ( "func" in marker . colour ) && marker . colour . func === "flatten" ) {
1715+ isFlatten = true ;
17131716 }
17141717 colour = this . resolveColour ( marker . colour ) ;
17151718 }
17161719 let opacity = 0.25 ;
17171720 if ( ( "opacity" in marker ) && ( marker . opacity !== undefined ) ) {
17181721 opacity = marker . opacity ;
17191722 }
1723+ // don't do automatic opacity of function is flatten
1724+ else if ( isFlatten ) {
1725+ opacity = 1 ;
1726+ }
17201727 let pattern : string | undefined ;
17211728 if ( ( "pattern" in marker ) && ( marker . pattern !== undefined ) && ( marker . pattern . length > 0 ) ) {
17221729 pattern = marker . pattern ;
You can’t perform that action at this time.
0 commit comments