Skip to content

Commit 2496444

Browse files
devversionmmalerba
authored andcommitted
refactor(cdk/drag-drop): do not always retain drag handle directive
We recently regressed with lightweight tokens as `CdkDrag` now injects `CdkDragHandle` without using a lightweight token.
1 parent 1bff326 commit 2496444

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

goldens/size-test.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
cdk/drag-drop/all-directives: 154096
2-
cdk/drag-drop/basic: 151903
2+
cdk/drag-drop/basic: 151353
33
material-experimental/mdc-chips/basic: 147607
44
material-experimental/mdc-form-field/advanced: 220897
55
material-experimental/mdc-form-field/basic: 220060

src/cdk/drag-drop/directives/drag.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ export class CdkDrag<T = any> implements AfterViewInit, OnChanges, OnDestroy {
191191
@Optional() @Inject(CDK_DRAG_CONFIG) config: DragDropConfig,
192192
@Optional() private _dir: Directionality, dragDrop: DragDrop,
193193
private _changeDetectorRef: ChangeDetectorRef,
194-
@Optional() @Self() private _selfHandle?: CdkDragHandle) {
194+
@Optional() @Self() @Inject(CDK_DRAG_HANDLE) private _selfHandle?: CdkDragHandle) {
195195
this._dragRef = dragDrop.createDrag(element, {
196196
dragStartThreshold: config && config.dragStartThreshold != null ?
197197
config.dragStartThreshold : 5,

0 commit comments

Comments
 (0)