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

获取节点后无法获取zindex #2057

Closed
haipahp opened this issue Feb 1, 2025 · 2 comments
Closed

获取节点后无法获取zindex #2057

haipahp opened this issue Feb 1, 2025 · 2 comments

Comments

@haipahp
Copy link

haipahp commented Feb 1, 2025

用getnodebyid获取的节点正确,但是无法获取父类的zindex属性怎么办

@ChangeSuger
Copy link
Collaborator

不是很理解具体在问什么,如果是想获取一个节点并且拿到该节点的 zIndex 的话,可以参考以下实现:

// 这里假设 LogicFlow 对象存储在变量 lf 中,并假设要获取的节点的 id 为 "1"
const node = lf.getNodeModelById('1');

console.log(node.zIndex); // > 在控制台里会输出该节点的 zIndex

如果这不是您想要的回答,推荐明确下具体想问的问题是什么~

@haipahp
Copy link
Author

haipahp commented Feb 4, 2025

发现要用model才能拿到zindex属性

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