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

Feature Request: set class (other attributes?) of map div #44

Open
spacedman opened this issue Dec 31, 2010 · 2 comments
Open

Feature Request: set class (other attributes?) of map div #44

spacedman opened this issue Dec 31, 2010 · 2 comments

Comments

@spacedman
Copy link

Could it be possible to set the class of the DIV created by InfoMap instances (and possibly the others). At the moment the template creates it with only an id attribute, but it would be useful for the rendering template to set the class. This could also extend to other attributes of the DIV, but of course all your styling should be done by class/id anyway.

@spacedman
Copy link
Author

Looking at the code, this seems to be because there's no attrs parameter passed to the Map constructor. This seems to be the standard way to pass attributes to widget HTML (from my inspection of the Django widget codes).

@cazgp
Copy link

cazgp commented Jul 24, 2012

I just implemented a small tweak to make this possible. Simply change the constructor of "Map" to add "attrs=None" at the end, and then pass attrs to the super constructor.

I can write this into a patch - should I pull and request a commit? Is this a bug or a decision?

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

No branches or pull requests

2 participants