Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feat] Add getTooltipContent() to layer so that if present the Deck overlay can use it #9349

Open
Kilowhisky opened this issue Jan 10, 2025 · 0 comments
Labels

Comments

@Kilowhisky
Copy link

Kilowhisky commented Jan 10, 2025

Target Use Case

Having the master deck layer control visualization of sub-layer data causes an inversion of control and concerns issue. Having this present means that the layers gain control of visualization of the popup data.

Proposal

Add this to the layer definition so it is available at all layers.

getTooltipContent?: (pickingInfo: PickingInfo) => TooltipContent;

Then at the deck main layer.

    // Let individual layers control the tooltip
    // This is the way it should be
    getTooltip(pickingInfo) {
      if (pickingInfo.layer?.props?.getTooltipContent) {
        return pickingInfo.layer.props.getTooltipContent(pickingInfo);
      }
      return null;
    },
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant