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

Allow to pass css_classes as option to tree.render #471

Open
thomasstjerne opened this issue Dec 16, 2024 · 0 comments
Open

Allow to pass css_classes as option to tree.render #471

thomasstjerne opened this issue Dec 16, 2024 · 0 comments

Comments

@thomasstjerne
Copy link
Contributor

thomasstjerne commented Dec 16, 2024

tree.display is not available before tree.render has been called.
In order to use own css_classes you would need to call tree.render twice:

tree.render(options);
tree.display.css(css_classes).update();
tree.render(options);

Better:

tree.render({
            'container': '#phylotreeContainer',
            'max-radius': 468,
            'width': 500,
            'css_classes': {
                'tree-container': 'phylotree-container',
                'tree-scale-bar': 'phylotree-tree-scale-bar',
                 'node': 'phylotree-node'
         }
   });
thomasstjerne added a commit to thomasstjerne/phylotree.js that referenced this issue Dec 17, 2024
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

1 participant