Framer Motion Reford不允许拖动项目滚动容器
如果您在Framer Motion DND Toolkit的示例。您可以在DND工具包中看到,如果将项目拖出容器以外,则可以将其拖动。有没有一种方法可以使用重新排序组件在框架动作中复制这种自动滚动行为?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我遇到了同样的问题。我的临时工作是为了揭示
reorder.group.group
组件的高度,并允许身体通过解开其高度并允许页面溢出而不是元素而成长。这是一个示例:https:// codesandbox 。
鼠标车轮直至移动鼠标本身。我很想找到一个支持滚动和更新滚动而不是鼠标运动的解决方案,但这是我到目前为止能够提出的最好的!
如果您能够自己修复,希望您在这里分享您的解决方案。
I have been running into the same problem. My temporary work-around has been to unset the height on the
Reorder.Group
component and allow the body to grow by unsetting its height and allowing the page to overflow instead of the element. Here is an example:https://codesandbox.io/s/framer-motion-5-drag-to-reorder-lists-scroll-jtlql2
Note that it isn't perfect: it does not support panning, and the animation does not trigger after scrolling with your mouse wheel until you move the mouse itself. I would love to find a solution that supports panning and updates on scroll rather than mouse movement, but this has been the best I've been able to come up with so far!
Would love for you to share your solution here if you were able to fix it yourself.