Skip to content

Commit

Permalink
set correct color state before rendering custom layer
Browse files Browse the repository at this point in the history
fix #7708
  • Loading branch information
ansis committed Dec 18, 2018
1 parent 55f4c01 commit 7150baa
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/render/draw_custom.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ function drawCustom(painter: Painter, sourceCache: SourceCache, layer: CustomSty
} else {
painter.setCustomLayerDefaults();

context.setColorMode(painter.colorModeForRenderPass());
context.setStencilMode(StencilMode.disabled);

const depthMode = painter.depthModeForSublayer(0, DepthMode.ReadOnly);
Expand Down
Loading
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,44 @@
{
"version": 8,
"metadata": {
"test": {
"width": 64,
"height": 64,
"operations": [
[
"addCustomLayer",
"null-island"
]
]
}
},
"sources": {
"geometry": {
"type": "geojson",
"data": {
"type": "FeatureCollection",
"features": [{
"type": "Feature",
"properties": {},
"geometry": {
"type": "Point",
"coordinates": [0, 0]
}
}]
}
}
},
"layers": [
{
"id": "geometry",
"type": "circle",
"source": "geometry",
"layout": {
"visibility": "none"
},
"paint": {
"circle-radius": 40
}
}
]
}

0 comments on commit 7150baa

Please sign in to comment.