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

createEdge 返回 zIndex 无效 #4347

Open
tolerance-go opened this issue Jun 22, 2024 · 1 comment
Open

createEdge 返回 zIndex 无效 #4347

tolerance-go opened this issue Jun 22, 2024 · 1 comment

Comments

@tolerance-go
Copy link

问题描述

我在 createEdge 中返回 new Shape.Edge({ zIndex: -1, }) 希望在用户拖动 port 发起连线的时候,可以初始化连线样式,但是 zIndex 设置后不起作用

重现链接

https://codesandbox.io/p/sandbox/winter-cloud-forked-f3cjzt?layout=%257B%2522sidebarPanel%2522%253A%2522EXPLORER%2522%252C%2522rootPanelGroup%2522%253A%257B%2522direction%2522%253A%2522horizontal%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522id%2522%253A%2522ROOT_LAYOUT%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522UNKNOWN%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522clxpsn2zj0006356mgpudu1qm%2522%252C%2522sizes%2522%253A%255B100%252C0%255D%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522EDITOR%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522EDITOR%2522%252C%2522id%2522%253A%2522clxpsn2zj0002356m8m4qb60i%2522%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522direction%2522%253A%2522horizontal%2522%252C%2522id%2522%253A%2522SHELLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522SHELLS%2522%252C%2522id%2522%253A%2522clxpsn2zj0003356mzhkqvbhp%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%257D%252C%257B%2522type%2522%253A%2522PANEL_GROUP%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522direction%2522%253A%2522vertical%2522%252C%2522id%2522%253A%2522DEVTOOLS%2522%252C%2522panels%2522%253A%255B%257B%2522type%2522%253A%2522PANEL%2522%252C%2522contentType%2522%253A%2522DEVTOOLS%2522%252C%2522id%2522%253A%2522clxpsn2zj0005356m30m0864c%2522%257D%255D%252C%2522sizes%2522%253A%255B100%255D%257D%255D%252C%2522sizes%2522%253A%255B50%252C50%255D%257D%252C%2522tabbedPanels%2522%253A%257B%2522clxpsn2zj0002356m8m4qb60i%2522%253A%257B%2522tabs%2522%253A%255B%257B%2522id%2522%253A%2522clxpsn2zj0001356mdopc6r4x%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522type%2522%253A%2522FILE%2522%252C%2522filepath%2522%253A%2522%252Fsrc%252Findex.tsx%2522%252C%2522state%2522%253A%2522IDLE%2522%252C%2522initialSelections%2522%253A%255B%257B%2522startLineNumber%2522%253A12%252C%2522startColumn%2522%253A23%252C%2522endLineNumber%2522%253A12%252C%2522endColumn%2522%253A23%257D%255D%257D%255D%252C%2522id%2522%253A%2522clxpsn2zj0002356m8m4qb60i%2522%252C%2522activeTabId%2522%253A%2522clxpsn2zj0001356mdopc6r4x%2522%257D%252C%2522clxpsn2zj0005356m30m0864c%2522%253A%257B%2522id%2522%253A%2522clxpsn2zj0005356m30m0864c%2522%252C%2522tabs%2522%253A%255B%257B%2522type%2522%253A%2522UNASSIGNED_PORT%2522%252C%2522port%2522%253A0%252C%2522id%2522%253A%2522clxpspfo7001z356mw8u2yd3m%2522%252C%2522mode%2522%253A%2522permanent%2522%252C%2522path%2522%253A%2522%252F%2522%257D%255D%252C%2522activeTabId%2522%253A%2522clxpspfo7001z356mw8u2yd3m%2522%257D%252C%2522clxpsn2zj0003356mzhkqvbhp%2522%253A%257B%2522tabs%2522%253A%255B%255D%252C%2522id%2522%253A%2522clxpsn2zj0003356mzhkqvbhp%2522%257D%257D%252C%2522showDevtools%2522%253Atrue%252C%2522showShells%2522%253Afalse%252C%2522showSidebar%2522%253Atrue%252C%2522sidebarPanelSize%2522%253A15%257D

重现步骤

  1. 进入页面
  2. 从 port 拖拽连线,经过 node
  3. 此时线是在 node 的上层的
  4. 松开连线
  5. 此时线才会到 node 下层

预期行为

我希望 createEdge 设置的 zIndex 可以生效,拖拽时,线是在 node 的下层的,但我看到是在 node 上层

平台

  • 操作系统: Windows
  • 网页浏览器: Google Chrome
  • X6 版本: 2.18.1

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@tolerance-go
Copy link
Author

image
image

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

1 participant