-
-
Notifications
You must be signed in to change notification settings - Fork 848
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
设置了 custom_node_render 后 jmexpander 位置计算错误被遮蔽 #589
Comments
你在 |
我想这个问题可能的原因是 要验证这个原因,你可以把 抱歉 @hqm19 , 我对 React 并不是很在行,在我本地配置了一个 react 18 的项目,但加上你上面帖的代码后一直跑不起来,所以也没能复现这个情况。你能否把你项目的 package.json 帖出来?或者在github/gitee上搭建一个小的项目演示这个问题,我也好可以运行起来试一下? |
抱歉忘记说明 react 的版本了,我用的是 react 16 目前比较稳定。 react 18 + jsmind 还没调通。 我提交了一个工程把完整的复现代码放上去了: https://github.com/hqm19/jsmind-react |
Hi @hqm19 我提交了一个 PR hqm19/jsmind-react#1 你可以看看。 |
react 整体都是异步渲染的,把 react 改成同步没什么便捷的办法。 问了 ChatGPT ,综合后,下面的方案可以试试:
|
原因总结:
解决办法: 感谢 @hqm19 带来的建设性的讨论,以及非常有价值的尝试 #594 。 |
This issue was moved to a discussion.
You can continue the conversation there. Go to discussion →
版本 0.8.3,复现代码:
产生的dom结构:
页面效果:
注意上面第一个子节点,看不到展开按钮。实际因 left top 设值错误,被节点本身遮住了。并且被 custom_node_render 渲染出的节点,上下的 margin 也消失了,挤在一起。
The text was updated successfully, but these errors were encountered: