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

建议/疑问 #487

Closed
samjuis opened this issue Aug 10, 2023 · 3 comments
Closed

建议/疑问 #487

samjuis opened this issue Aug 10, 2023 · 3 comments

Comments

@samjuis
Copy link

samjuis commented Aug 10, 2023

1.源代码样式为啥要写那么多if去判断而不是直接使用 data[key] 这样去套用, 就能支持各种样式了。
2. 线条的样式支持在源码上并没有找到对应的leading-line-color设置方法,这段我在draw_line方法内自己单独设置了node来进行添加不知道对不对。(当重新渲染的时候,例如设置了某个节点的线条是虚线, 当刷新页面重新渲染时,其他部分线条也变成了虚线)
3. 当前不支持pre格式和超链接格式, 我还没找到设置的地方:(

@hizzgdev
Copy link
Owner

1,不如你说具体一些,我看看当时是怎么考虑的;
2,你看的是哪个源码?哪个文件呢? src目录里的吗?
3,node的topic里可以直接使用HTML

@samjuis
Copy link
Author

samjuis commented Aug 10, 2023

1 jsmind.js 文件 _reset_node_custom_style方法 这个方法我当前是加了个白名单 去添加‘px’字符串。
2 也是jsmind.js 里面的 画线的 方法里面添加的
我是用npm 拉取的, 路径就是jsmind/js/jsmind.js

@hizzgdev
Copy link
Owner

抱歉,刚发现之前的回复没有发出来:

  1. _reset_node_custom_style 这个方法之所以这么写,原则是“如果设置了某个选项,才会去应用这个选项”,而且是故意没有去支持所有的样式。有些样式之间可能会产生冲突,有些样式还可能会破坏脑图的正常显示。
  2. leading-line-color 这个功能只在 ES6 这个版本里支持,源码在 src 这个目录里,你找找看应该能找到,js/jsminnd.js 这个文件已经过时了,过段时间会删除掉。

@samjuis samjuis closed this as completed Aug 16, 2023
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

2 participants