-
Notifications
You must be signed in to change notification settings - Fork 62
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
怎么限制对象移动的范围 #110
Comments
目前需要自己结合拖拽事件判断下,或者你录屏展示一下具体使用场景(一般是需要用到哪个坐标系进行限制),我看看能不能支持一下,好像提这个问题的人挺多 |
|
上面 如果加了 变换 如: rotation:-90, around:'center', 就不能正常了 |
你这种情况需要两个元素都用worldBoxBounds来对比才准确,有现成的检测是否包含的方法: 等于你的需求是让Ellipse 限制在 Box内拖动对吧? |
用 worldToLocal 更新坐标 ,传入传数据发生变化了,界面没有变化
|
已经支持通过dragBounds限制拖动范围: https://leaferjs.com/ui/guide/property/draggable.html#dragbounds-iboundsdata-parent |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
如题
The text was updated successfully, but these errors were encountered: