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

DynamicMap and styles #361

Closed
jlstevens opened this issue Dec 15, 2015 · 2 comments
Closed

DynamicMap and styles #361

jlstevens opened this issue Dec 15, 2015 · 2 comments

Comments

@jlstevens
Copy link
Contributor

Because a DynamicMap doesn't contain elements (ignoring the cache), styles applied either with the %%opts magic or with __call__ don't work. The callback function can explicitly style elements that are returned using __call__ but this isn't particularly flexible for the user.

There are two things we can do:

  1. Accept this state of affairs but find a better way of making users aware that this is a limitation of DynamicMap and not a bug.
  2. Find some way to make it work.

The way I imagine we might be able to make it work is if we keep track of the styles that could apply to whatever is returned by the callback and then try to apply this to the output of the callback as it is generated. The second half of this is relatively easy, the tricky bit would be to know what styles have been applied that might be relevant.

I believe we use traverse to apply styles within HoloMaps (propagating the id). Perhaps, when a DynamicMap is found, we could have a place to record the information that would otherwise be propagated to the elements. Then as long as we have access to this information, the output of the callback in DynamicMap can be styled appropriately.

@jlstevens
Copy link
Contributor Author

This issue has been address in PR #368 which has now been merged.

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant