首页 > 解决方案 > 如何从 react-beautiful-dnd 中删除拖动开始动画?

问题描述

我想创建一个“调色板”来拖动使用react-beautiful-dnd. 这就像绘图应用程序中的调色板,即。(副本)可拖动对象在拖动过程中将保留在调色板中,并且调色板在拖动开始或拖动结束时不会动画。

我已经实现了我需要使用的大部分内容:

  1. 环境isDropEnabled={true}
  2. 用 CSS 隐藏占位符div[data-rbd-placeholder-context-id] {display: none !important;}
  3. 根据https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/drop-animation.md减少放置动画
  4. 使用 CSS 减少拖动动画div[data-rbd-draggable-context-id] {transition: 0.001s !important;}
  5. 在中插入重复DraggableonDragStart

拖动时仍有闪烁,放下时仍有闪烁。

我还能做些什么来防止react-beautiful-dnd在拖动开始时以及在拖动结束时对可拖动对象的删除进行动画处理?

在此处输入图像描述

标签: animationflickerreact-beautiful-dnd

解决方案


推荐阅读