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

removeCells()之后再addCell()添加的节点数据没有任何关系,报错getZIndex #3748

Closed
King-zuimx opened this issue Jul 7, 2023 · 6 comments
Labels
resolution: needs demos 需要复现 Issues that need minimal demos to reproduce any problems

Comments

@King-zuimx
Copy link

问题描述

Uncaught TypeError: Cannot read properties of null (reading 'getZIndex')

我在使用的过程中有这么一个场景,我需要删除一些节点然后再添加一些节点数据。

代码中
image

会出现下面的错误
image

重现链接

重现步骤

1、我把一些节点数据保存为json
2、我通过遍历我的数据,来修改这个json
3、再把这个json用parseJSON转成节点数组
4、我更新我自己的数据,来修改这个json,在修改中会删除原来的节点,根据新数据添加成新的节点。
5、接下来就出现了上面的错误。

预期行为

我期望删除和添加节点之后,不报错。

平台

  • 操作系统: [Windows]
  • 网页浏览器: [Google Chrome,]
  • X6 版本: [1.34.13]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Jul 7, 2023

👋 @King-zuimx

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@NewByVector
Copy link
Contributor

能否提供一个可以复现的 demo?

@NewByVector NewByVector added the resolution: needs demos 需要复现 Issues that need minimal demos to reproduce any problems label Jul 7, 2023
@King-zuimx
Copy link
Author

我下个星期抽个时间给你写个

@lloydzhou
Copy link
Contributor

看一下版本号,我映像中之前v1.x有出现过类似的问题。好像处理过

@NewByVector
Copy link
Contributor

因为无法复现,暂时关闭。

@jiang-zhong-xi
Copy link

这有个链接:https://codesandbox.io/s/zealous-sid-pps33n?file=/src/index.ts 浮现了类似问题。 @NewByVector

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: needs demos 需要复现 Issues that need minimal demos to reproduce any problems
Projects
None yet
Development

No branches or pull requests

4 participants