Home > Software engineering >  Disable Angular's Dragging Animation
Disable Angular's Dragging Animation

Time:02-01

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>

CodePudding user response:

Can you try to add these css:

.cdk-drag {
  transition: none;
}

.cdk-drag-animating {
  transition: none;
}
  •  Tags:  
  • Related