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

关于2.3.2版本元素对齐不显示辅助线的问题 #10

Closed
Vegril opened this issue Nov 27, 2019 · 6 comments
Closed

关于2.3.2版本元素对齐不显示辅助线的问题 #10

Vegril opened this issue Nov 27, 2019 · 6 comments
Labels
good first issue Good for newcomers

Comments

@Vegril
Copy link

Vegril commented Nov 27, 2019

之前用的2.2.0版本,吸附对齐是可以用的,昨天更新到2.3.2版本后看文档中写属性是snap和snap-tolerance,但是我设置了还是不出现辅助线,有什么需要注意的吗?
image

@gorkys
Copy link
Owner

gorkys commented Nov 27, 2019

@Vegril 你在文档页面搜索refLineParams,下面有demo代码。

@Vegril
Copy link
Author

Vegril commented Nov 27, 2019

原来如此,太感谢了,我以为下面那个事件是不需要的,抱歉抱歉

@gorkys gorkys closed this as completed Nov 27, 2019
@ccyzz
Copy link

ccyzz commented Dec 6, 2019

@Vegril请问你的辅助线循环时绑定的key有没有报错,我绑定的是index,但是老是报错

@Vegril
Copy link
Author

Vegril commented Dec 6, 2019

@Vegril请问你的辅助线循环时绑定的key有没有报错,我绑定的是index,但是老是报错

任何情况下都不推荐绑定index,会导致不可预估的错误,个人做法是手动添加一个id属性,然后绑定这个属性即可.
image

@Vegril
Copy link
Author

Vegril commented Dec 6, 2019

@Vegril请问你的辅助线循环时绑定的key有没有报错,我绑定的是index,但是老是报错
getRefLineParams(params) { if (params.vline) { for (let i = 0; i < params.vline.length; i++) { params.vline[i].id = i; } } if (params.hline) { for (let i = 0; i < params.hline.length; i++) { params.hline[i].id = i; } } const { vLine, hLine } = params; this.vLine = vLine; this.hLine = hLine; }

@ccyzz
Copy link

ccyzz commented Dec 6, 2019

@Vegril请问你的辅助线循环时绑定的key有没有报错,我绑定的是index,但是老是报错
getRefLineParams(params) { if (params.vline) { for (let i = 0; i < params.vline.length; i++) { params.vline[i].id = i; } } if (params.hline) { for (let i = 0; i < params.hline.length; i++) { params.hline[i].id = i; } } const { vLine, hLine } = params; this.vLine = vLine; this.hLine = hLine; }

按照你说的去写,已经解决了,非常感谢!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants