Ad

Disable Angular's Dragging Animation

- 1 answer

I'm looking for away to disable Angular's animation when dragging elements. Currently Angular smoothly drag the element, if you move the mouse quickly the dragged element will follow the mouse smoothly not instantly. This isn't the behaviour I want. Is there a way to disable the animation or change it to instant move?

See below for a sample code

<div cdkDrag>Move Me</div>
Ad

Answer

Can you try to add these css:

.cdk-drag {
  transition: none;
}

.cdk-drag-animating {
  transition: none;
}
Ad
source: stackoverflow.com
Ad