如何为 Angular Material drag e drop v10 提供混合方向

How to provide mixed orientation to Angular Material drag e drop v10

我正在使用 Material drag e drop they don't allow the mixed-orientation of the drag e drop so to use it with both directions I use this workaround

但在上一个版本中,他们删除了 CdkDropList.enter 方法。

那么现在我怎样才能达到和以前一样的结果呢?

解决方法如下: https://github.com/angular/components/issues/13372#issuecomment-664067103

这是 angular 9 版本的新代码:

this.source._dropListRef.start();
this.placeholder._dropListRef.enter(drag._dragRef, drag.element.nativeElement.offsetLeft, drag.element.nativeElement.offsetTop);