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

多个path自定义组件设置refD后显示错误 #3398

Closed
hanyuesoyeon opened this issue Mar 17, 2023 · 4 comments
Closed

多个path自定义组件设置refD后显示错误 #3398

hanyuesoyeon opened this issue Mar 17, 2023 · 4 comments
Labels
type: discussion 讨论 Usage questions, guidance, and other discussions

Comments

@hanyuesoyeon
Copy link

Describe the bug

image
代码:markup:[
{
tagName: 'path',
selector: 'body'
},
{
tagName: 'path',
selector: 'inner'
}
],
attrs: {
body:{
refD:"M 1 5 C 16 1 46 1 58 5 L 58 34 C 43 38 16 38 1 34 Z",
stroke:"#A2B1C3"
},

            inner:{
                refD:"M 1 5 C 16 9 46 9  58 5",
                stroke:"#A2B1C3",
            }
        }
        当我设置inner的refD属性则显示错误,当我设置inner的d属性,则显示正确

Your Example Website or App

暂无

Steps to Reproduce the Bug or Issue

暂无

Expected behavior

期待
image

设置redD是错误的
image

Screenshots or Videos

暂无

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • Browser: [e.g. Chrome, Safari, Firefox]
  • Version: [e.g. 91.1]

Additional context

暂无

@NewByVector
Copy link
Contributor

参考 refD 的定义,实际显示 path 的时候,会将 pathData 按照参照物进行平移和缩放,所以图形会变形。

@NewByVector NewByVector added the type: discussion 讨论 Usage questions, guidance, and other discussions label Mar 22, 2023
@hanyuesoyeon
Copy link
Author

大佬,有什么办法在不变形情况下,还能保持缩放吗?因为设置d则不能缩放,设置refD则会变形

@NewByVector
Copy link
Contributor

@hanyuesoyeon 需要设置相对 path。

@x6-bot
Copy link
Contributor

x6-bot bot commented Jul 12, 2024

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.

@x6-bot x6-bot bot locked as resolved and limited conversation to collaborators Jul 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: discussion 讨论 Usage questions, guidance, and other discussions
Projects
None yet
Development

No branches or pull requests

2 participants