-
Notifications
You must be signed in to change notification settings - Fork 19.8k
Open
Labels
bugdifficulty: easyIssues that can be fixed more easily than the average.Issues that can be fixed more easily than the average.enThis issue is in EnglishThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.We are not sure about whether this is a bug/new feature.waiting-for: community
Milestone
Description
Version
5.0.1
Reproduction link
https://codesandbox.io/s/young-cache-2jkt8?file=/src/App.tsx
Steps to reproduce
See the codesandbox
What is expected?
graph edge positions should be corrent.
What is actually happening?
If you clicked the reset button, sometimes one (sometimes more than one) of the edge has a wrong position, it will become y1 === y2 or x1 === x2 when it shouldn't.
it's caused by subPixelOptimize, if disable subPixelOptimize in line, it works. It seems the "x1, x2, y1, y2" passed to subPixelOptimize are not the line's true pixel position but a small fraction number like 0.05, but style.lineWidth is counted by pixel, which maybe much larger like 3, causeing this issue.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugdifficulty: easyIssues that can be fixed more easily than the average.Issues that can be fixed more easily than the average.enThis issue is in EnglishThis issue is in EnglishpendingWe are not sure about whether this is a bug/new feature.We are not sure about whether this is a bug/new feature.waiting-for: community