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

[BUG] 画布大小不为1时,图形修改会导致放大或缩小 #49

Closed
JavanFeng opened this issue Jan 25, 2024 · 2 comments · Fixed by #54
Closed

[BUG] 画布大小不为1时,图形修改会导致放大或缩小 #49

JavanFeng opened this issue Jan 25, 2024 · 2 comments · Fixed by #54
Assignees

Comments

@JavanFeng
Copy link

Bug Report / 缺陷报告
问题描述 / Describe the bug
放大画布后,所有的图形在修改属性时会导致图形不断放大

复现步骤 / To Reproduce

期望行为 / Expected behavior
不会放大缩小
截图 / Screenshots

20240125_153546.mp4

应该是polyfill下node.ts的toObject改写了 attrs的属性转化为了绝对值,所以重新设置后位置大小变化。修改后恢复正常,但是我不确定你转化它们的意图是什么

@JessYan0913
Copy link
Owner

Bug Report / 缺陷报告 问题描述 / Describe the bug 放大画布后,所有的图形在修改属性时会导致图形不断放大

复现步骤 / To Reproduce

期望行为 / Expected behavior 不会放大缩小 截图 / Screenshots

20240125_153546.mp4
应该是polyfill下node.ts的toObject改写了 attrs的属性转化为了绝对值,所以重新设置后位置大小变化。修改后恢复正常,但是我不确定你转化它们的意图是什么

在polyfill下改写toObject是为了配合历史记录功能的权宜之计,另一个原因是Konva对于默认的值在toObject的时候就是空的,跟作者沟通后说是为了减少toObject体积

@JessYan0913
Copy link
Owner

Bug Report / 缺陷报告 问题描述 / Describe the bug 放大画布后,所有的图形在修改属性时会导致图形不断放大

复现步骤 / To Reproduce

期望行为 / Expected behavior 不会放大缩小 截图 / Screenshots

20240125_153546.mp4
应该是polyfill下node.ts的toObject改写了 attrs的属性转化为了绝对值,所以重新设置后位置大小变化。修改后恢复正常,但是我不确定你转化它们的意图是什么

我明白问题出在那里了

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

Successfully merging a pull request may close this issue.

2 participants