question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TextLayer backgroundColor not showing up.

See original GitHub issue

Given a new TextLayer layer:

layers.push(new TextLayer({
  id: `label-layer[${i}]`,
  data: placeholderArr, // mock data
  pickable: true,
  getPosition: d => d.coordinates,
  getText: d => d.label,
  getSize: 16,
  getColor: d => d.color,
  opacity: 1,
  getTextAnchor: 'middle',
  getAlignmentBaseline: 'center',
  backgroundColor: [0, 0, 250] // Doesn't seem to work?
}))

Not sure why backgroundColor wouldn’t work?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
ibgreencommented, Apr 9, 2020

Maybe we should adopt a convention of adding a `“from:v8.0” badge or similar to classes and props in the docs when we add new features? I was about to start doing that in loaders.gl…

0reactions
btbritzcommented, Apr 9, 2020

That was it. Thank you.

@ibgreen Love that idea 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

TextLayer backgroundColor not showing up. #4459 - GitHub
Given a new TextLayer layer: layers.push(new TextLayer({ id: `label-layer[${i}]`, data: placeholderArr, // mock data pickable: true, getPosition ...
Read more >
CATextLayer does not show text (just background color)
The main problem seems to be this line: playerLayer.player?.play(). You're apparently saying that before the player layer is ready to play.
Read more >
TextLayer - deck.gl
The TextLayer renders text labels at given coordinates. ... Otherwise the text faces up (z). ... it does not impact the size of...
Read more >
How to set a background color to a text layer in Gimp so that ...
In GIMP text layers don't have a background colour. So, what you want isn't possible. To have a background you'd need to create...
Read more >
CATextLayer | Apple Developer Documentation
Text can only be drawn using sub-pixel antialiasing when it is composited into an existing opaque background at the same time that it's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found