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

Custom icon per node #32

Open
smilerz opened this issue Feb 26, 2021 · 1 comment
Open

Custom icon per node #32

smilerz opened this issue Feb 26, 2021 · 1 comment

Comments

@smilerz
Copy link

smilerz commented Feb 26, 2021

Is it possible to set a custom icon per node and if none provided use the default icon?

If not possible I'd like to add a feature request.

@Severino
Copy link

Severino commented Oct 13, 2023

I had the same problem and I checked out the code to create a PR.
But how it is currently done, the images are just set as base64 images inside the .less (.css) file and can be overwritten by your own css.

I'm doing it like this now:

.tree-default-small .tree-closed > .tree-ocl {
    background-image: url('/img/tree/tree_closed.svg');
    
    /* If your icon has a different size you can adjust it using this */
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    
}

This has to be done for all icons you want to change.
It's quite tedious but spontaneously I had no better idea how to do it.

Although it's quite neat that it easily works like this.

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

3 participants