-
-
Notifications
You must be signed in to change notification settings - Fork 855
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
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
如何单独为每个节点设置线条颜色呢 #505
Comments
|
好的谢谢,所以按照这个逻辑,假设我的节点id是1,2,3,4,5,6,其下的子节点是1-1,1-2,2-1,2-1-1这种形式的话,我需要对每一个节点进行处理,给id以1开头的节点线条一个颜色,以2开头的一个颜色,然后以此类推,给这6类及其子节点分别设置6种线条颜色对吗 |
https://hizzgdev.github.io/jsmind/docs/zh/1.usage.html 在这个文档的1.4 样式里提到了用法,感觉用这个还挺符合你的需求的。你可以在设置节点颜色的同时设置引导线的颜色。 |
好的明白了,我去尝试一下,谢谢 |
逻辑上符合你的需求。至于如何标识是六类中的哪一类,你可以从数据上看怎么方便。如果数据在db里的话,不用id来标识也问题不大。还是看你方便。 |
哈喽哈喽,再叨扰一句,如果我的6类分支想实现:前三个默认展开至3级,后三个默认展开至2级,这个只能通过遍历设置每个节点的expanded来实现嘛 |
应该不需要遍历所有节点,最好是在数据层面把 不过如果你能在 show 之前对脑图数据进行修改的话,其实就会更容易实现。 node 的数据结构大概是这样的: {
"id": "xxxx",
"topic": "topic-xxx",
"expanded": true
} 你只要把上面的 expanded 改成 false,它就默认会把子节点给收起来了。 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
请教一下,我正在实现一个有固定六个分类的思维导图,每个分类下面有2或3级的子节点。现在有6种固定的颜色用于每个分类的节点颜色和线条颜色,我通过jm.set_node_color给6个一级节点分别设置了颜色,那线条颜色有没有什么方法单独设置,我貌似只看到一个data.leading-line-color,这个怎么用呢,它会同时生效于每个分类子节点的线条颜色吗?
The text was updated successfully, but these errors were encountered: