Skip to content
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

Angular 12 #36

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Use cacheParentPositions instead of cacheItemsPositions
  • Loading branch information
AlexisMillette committed Mar 26, 2020
commit 47c32a89d30556245825895bd59dc2427de2637b
7 changes: 2 additions & 5 deletions projects/cdk-drag-scroll/src/lib/drag-scroll.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ export class DragScrollDirective<T = any> implements OnDestroy, OnChanges {
// https://github.com/angular/material2/issues/15227
setTimeout(() => {
const dropListRef: any = this.getDropListRef();
dropListRef._cacheItemPositions();
dropListRef._cacheParentPositions();
this.addDebugInfo();
});

Expand Down Expand Up @@ -229,10 +229,7 @@ export class DragScrollDirective<T = any> implements OnDestroy, OnChanges {

private adjustContainers() {
const dropListRef: any = this.getDropListRef();
dropListRef._cacheItemPositions();
// dropListRef._siblings.forEach(sibling => {
// sibling._cacheOwnPosition();
// });
dropListRef._cacheParentPositions();
}

private adjustItems(deltaX: number, deltaY: number) {
Expand Down