()
| 195 | private _unsortedItems = new Set<CdkDrag>(); |
| 196 | |
| 197 | constructor() { |
| 198 | const config = inject<DragDropConfig>(CDK_DRAG_CONFIG, {optional: true}); |
| 199 | const injector = inject(Injector); |
| 200 | |
| 201 | if (typeof ngDevMode === 'undefined' || ngDevMode) { |
| 202 | assertElementNode(this.element.nativeElement, 'cdkDropList'); |
| 203 | } |
| 204 | |
| 205 | this._dropListRef = createDropListRef(injector, this.element); |
| 206 | this._dropListRef.data = this; |
| 207 | |
| 208 | if (config) { |
| 209 | this._assignDefaults(config); |
| 210 | } |
| 211 | |
| 212 | this._dropListRef.enterPredicate = (drag: DragRef<CdkDrag>, drop: DropListRef<CdkDropList>) => { |
| 213 | return this.enterPredicate(drag.data, drop.data); |
| 214 | }; |
| 215 | |
| 216 | this._dropListRef.sortPredicate = ( |
| 217 | index: number, |
| 218 | drag: DragRef<CdkDrag>, |
| 219 | drop: DropListRef<CdkDropList>, |
| 220 | ) => { |
| 221 | return this.sortPredicate(index, drag.data, drop.data); |
| 222 | }; |
| 223 | |
| 224 | this._setupInputSyncSubscription(this._dropListRef); |
| 225 | this._handleEvents(this._dropListRef); |
| 226 | CdkDropList._dropLists.push(this); |
| 227 | |
| 228 | if (this._group) { |
| 229 | this._group._items.add(this); |
| 230 | } |
| 231 | } |
| 232 | |
| 233 | /** Registers an items with the drop list. */ |
| 234 | addItem(item: CdkDrag): void { |
nothing calls this directly
no test coverage detected