Bug: TextLayer rendered behind other layers
See original GitHub issueI have multiple layers that I pass to my DeckGL component. The last of which is a TextLayer.
Actual Result
The Scatterplot and GeoJsonLayers that preceed the TextLayer in the layers array overlay the TextLayer. The IconLayer which is also passed in after the ScatterplotLayer and GeoJsonLayer is rendered correctly.
Expected Result
As the TextLayer is the last item in the Array, it should be rendered on top of all other layers. So the white text should appear in front of the grey dot and the grey lines.
Code Example
Here’s the generation of the layer array passed to the DeckGL component
return [
new ScatterplotLayer({
id: 'grey-dots',
data: greyDots,
getPosition: d => d.geometry.coordinates,
getRadius: 20,
}),
new GeoJsonLayer({
id: 'lines',
data: lines
getLineColor: [129, 134, 145],
}),
new IconLayer({
id: 'icon',
data: markerPoints,
wrapLongitude: true,
getIcon: d => 'marker',
getPosition: d => d.geometry.coordinates,
getColor: d => getColor(d),
getSize: d => 5,
iconAtlas: '/icon-atlas.png',
iconMapping: {
marker: {
x: 0,
y: 0,
width: 128,
height: 128,
anchorY: 128,
mask: true,
},
},
}),
new TextLayer({
id: 'icon-texts',
data: texts,
getText: d => `My Text`,
getPosition: d => d.geometry.coordinates,
getColor: d => [256, 256, 256],
getSize: d => 20,
sizeScale: 1,
getPixelOffset: [0, 15],
}),
];
Is there a bug or am I doing something wrong?
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
TextLayer rendered behind other layers #2460 - visgl/deck.gl
I have multiple layers that I pass to my DeckGL component. ... Bug: TextLayer rendered behind other layers #2460.
Read more >Text layer playback/render glitch
Hi, I'm working on some text for a video and when attempting to play back or render the video with the text layers,...
Read more >22 Easy Fixes to Common Problems in After Effects (2022)
Thats what the pan behind tool is for. Why 22? because it is 2022 ... 6 I want to move all my layers...
Read more >Unity TextMeshPro UGUI object is hidden behind other ...
My Game uses the Sorting Layer elements on all of my sprites, so that they don't get hidden behind others. I'm trying to...
Read more >CALayer Tutorial for iOS: Getting Started
The Layer Player app demonstrates nine different CALayer capabilities. ... All layer classes, not just CATextLayer , render at a scale ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Maybe disable depth testing for the text layer, or add a small Z offset?
Closing issue, please re-open if necessary and provide more details to help isolate the issue.