-
Notifications
You must be signed in to change notification settings - Fork 110
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
fix: x,y in rect changed when sprite scale to a minimum size #289
base: main
Are you sure you want to change the base?
fix: x,y in rect changed when sprite scale to a minimum size #289
Conversation
🦋 Changeset detectedLatest commit: 14e2aed The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@caohongz 太棒了 最好能补充单测, |
* 值为 true 时,将固定中心点不变进行缩放 | ||
* 值为 false 时,将固定对角点不变进行缩放 | ||
*/ | ||
scaleFixedCenter = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议修改命名 fixedScaleCenter
, 跟 fixedAspectRatio
保持相似模式
1、有一些关联,我会尽量拆分成两个PR,如果拆分不开我会新开一个Feature的,附带修复bug; |
本次PR仅修复缩放bug,添加了带旋转角度的单测,后续另开PR添加新功能。 |
修复:针对sprite缩放时,如缩放后的尺寸小于最小限制,会出现x和y坐标点漂移的问题。
最终效果如下:
fixed3.mp4