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

Safari 下垂直线或者直线会选中 dropShadow 高亮时,线段会消失 #3573

Open
awpsawps12 opened this issue May 8, 2023 · 3 comments
Labels
type: bug 缺陷 Defects and unexpected behaviors

Comments

@awpsawps12
Copy link

Describe the bug

Safari 下,使用 dropShadow 实现线段高亮,在水平线段和垂直线段高亮时线段会消失,但折线不会。
具体效果见录屏。

Your Example Website or App

none

Steps to Reproduce the Bug or Issue

graph.on('edge:selected', ({ cell }) => {
      cell.attr('line/filter', {
        name: 'dropShadow',
        args: {
          dx: 2,
          dy: 2,
          blur: 3,
          color: 'skyblue',
        },
      });
    });

Expected behavior

线段高亮正常显示

Screenshots or Videos

2023-05-08.18.58.53.mov

Platform

  • OS: macOS
  • Browser: Safari
  • Version: 16.4

Additional context

No response

@NewByVector
Copy link
Contributor

NewByVector commented May 8, 2023

使用 filterUnits 属性可以解决该问题。

filter: {
  name: 'dropShadow',
  args: {
    dx: 2,
    dy: 2,
    blur: 3,
    color: 'skyblue',
  },
  attrs: {
    width: "100%",
    height: "100%",
    filterUnits: "userSpaceOnUse"
  }
}

可以参考这个 demo

@NewByVector NewByVector added the type: discussion 讨论 Usage questions, guidance, and other discussions label May 8, 2023
@awpsawps12
Copy link
Author

awpsawps12 commented May 9, 2023

谢谢 @NewByVector ,但是使用 userSpaceOnUse 后,在 autoResize 的画布中又会有如下问题:

2023-05-09.11.18.43.mov

@NewByVector
Copy link
Contributor

@awpsawps12 暂时还没有定位到具体原因,我们会继续排查。

@NewByVector NewByVector added type: bug 缺陷 Defects and unexpected behaviors and removed type: discussion 讨论 Usage questions, guidance, and other discussions labels Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 缺陷 Defects and unexpected behaviors
Projects
None yet
Development

No branches or pull requests

2 participants