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

group组合的resize问题 #150

Open
yiyou1992 opened this issue Jul 18, 2024 · 1 comment
Open

group组合的resize问题 #150

yiyou1992 opened this issue Jul 18, 2024 · 1 comment

Comments

@yiyou1992
Copy link

大神你好,我这边在看您的源码学习moveable,但是遇到一个组合在执行resize的时候边框异常的问题,所以想请教下您,下面是问题截图

执行resize放大时:
微信图片_20240718105124
moveable边框会超出组合本身的宽高

执行resize缩小时:
微信图片_20240718105134
moveable边框会小于组合本身的宽高

但是我松开鼠标的时候,边框又会正常贴合组合宽高显示
问下大神这种情况是什么原因呢?

@palxiao
Copy link
Owner

palxiao commented Nov 12, 2024

本项目里moveable的相关代码我也是好久前写的了,实现方式比较粗糙,组合这块交互体验也有些不佳,主要是因为组合元素变换后需要重新计算其所有子组件的位置大小,而moveable中所使用的是transform变换,在本项目早期的数据结构中我并未支持变换属性,需替换为left、top、rotate等重新赋值,所以导致换算比较麻烦,后期如果用transform matrix重构会更好

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

No branches or pull requests

2 participants