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

Credit not being added to lightbox. showOnScreen is being ignored #10789

Closed
cmcleese opened this issue Sep 14, 2022 · 1 comment
Closed

Credit not being added to lightbox. showOnScreen is being ignored #10789

cmcleese opened this issue Sep 14, 2022 · 1 comment

Comments

@cmcleese
Copy link

Trying to add a custom credit to the lightbox.
From the documentation link
https://cesium.com/learn/cesiumjs/ref-doc/Credit.html?classFilter=cred
showOnScreen seems to have no effect for either addCredit or addDefaultCredit.

None of the following work as intented:

viewer.scene.frameState.creditDisplay.addCredit(new Cesium.Credit('<a>My New Credit1</a>', true));
viewer.scene.frameState.creditDisplay.addCredit(new Cesium.Credit('<a>My New Credit2</a>', false));
viewer.scene.frameState.creditDisplay.addDefaultCredit(new Cesium.Credit('<a>My New Credit3</a>', true));
viewer.scene.frameState.creditDisplay.addDefaultCredit(new Cesium.Credit('<a>My New Credit4</a>', false));

Sandcastle example:
https://sandcastle.cesium.com/#c=tZI/a8MwEMW/yuElNgSJtN2imIIz9s8Q6OTlIp1bUVkO0tnB/fR1HBdCmqEpZNDw3t27Hw+kGx8ZOkt7CrACT3soKNq2Fm+jl5aJHnXReEbrKZRJtiz9MSGiJk+iCljThpFJ6EDG8trGncNeoDHFaKQnhydnpjB/7uHlMBidhZKYz+bAoaXsRoy7iVGhi1dC1lRh6/jvrPt/97ka9XBWK5knZTIQAX4egIrcO8qPAuDR1rsmMLTBpUJIpnqgM0W5bfUnsdAxZsspKU+jytgOrFld+BigHcY4TKrWuY39ojLJlRz2f0Vdg8b699eOwtD5sPaxyJ+OphBCyUFeTnLTuC2Gs8vf

@ggetz
Copy link
Contributor

ggetz commented Sep 16, 2022

Hi @cmcleese, I believe this is a duplicate of #6215. That issue goes into further discussion of what addCredit and addDefault credit do, and how showOnScreen applies to both. The public API and docs are not entirely clear about the behavior.

We'd be happy to review a PR if you have some availability to take a look.

I'm going to close this issue to keep discussion in one place. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants