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

边上工具添加source-arrowhead后,导致鼠标移出的时边的label值无法保存 #4418

Open
zydemail opened this issue Aug 29, 2024 · 1 comment

Comments

@zydemail
Copy link

Describe the bug

添加了source-arrowhead工具,但是鼠标移出的时已有的edge-editor也没了,知道怎么解决吗?

Your Example Website or App

https://codesandbox.io/p/sandbox/elegant-roentgen-clkcrx?file=%2Findex.ts%3A144%2C1

Steps to Reproduce the Bug or Issue

    graph.on('edge:mouseenter', ({ cell }) => {
      if (!cell.hasTool('source-arrowhead'))  {
        cell.addTools('source-arrowhead')
      }
      if (!cell.hasTool('target-arrowhead')) {
        cell.addTools('target-arrowhead')
      }
    })
    graph.on('edge:mouseleave', ({ cell }) => {
      if(cell.hasTool('source-arrowhead')) {
        cell.removeTool('source-arrowhead')
      }
      if(cell.hasTool('target-arrowhead')) {
        cell.removeTool('target-arrowhead')
      }
    })

image
image

Expected behavior

预期边的label值能保存

Screenshots or Videos

No response

Platform

pc端chrome浏览器

Additional context

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Aug 29, 2024

👋 @zydemail

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.

@zydemail zydemail reopened this Aug 29, 2024
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