Skip to content

Commit d44e5dc

Browse files
authored
chore(drag-drop): import ViewportRuler from cdk/scrolling instead of cdk/overlay (#12871)
1 parent 27e88c3 commit d44e5dc

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

src/cdk/drag-drop/drag.ts

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9+
import {Directionality} from '@angular/cdk/bidi';
10+
import {ViewportRuler} from '@angular/cdk/scrolling';
11+
import {DOCUMENT} from '@angular/common';
912
import {
1013
ContentChild,
1114
ContentChildren,
@@ -23,24 +26,22 @@ import {
2326
SkipSelf,
2427
ViewContainerRef,
2528
} from '@angular/core';
26-
import {DOCUMENT} from '@angular/common';
27-
import {Directionality} from '@angular/cdk/bidi';
28-
import {CdkDragHandle} from './drag-handle';
29-
import {CdkDropContainer, CDK_DROP_CONTAINER} from './drop-container';
29+
import {merge, Observable, Subject} from 'rxjs';
30+
import {takeUntil} from 'rxjs/operators';
31+
import {DragDropRegistry} from './drag-drop-registry';
3032
import {
31-
CdkDragStart,
33+
CdkDragDrop,
3234
CdkDragEnd,
33-
CdkDragExit,
3435
CdkDragEnter,
35-
CdkDragDrop,
36+
CdkDragExit,
3637
CdkDragMove,
38+
CdkDragStart,
3739
} from './drag-events';
38-
import {CdkDragPreview} from './drag-preview';
40+
import {CdkDragHandle} from './drag-handle';
3941
import {CdkDragPlaceholder} from './drag-placeholder';
40-
import {ViewportRuler} from '@angular/cdk/overlay';
41-
import {DragDropRegistry} from './drag-drop-registry';
42-
import {Subject, merge, Observable} from 'rxjs';
43-
import {takeUntil} from 'rxjs/operators';
42+
import {CdkDragPreview} from './drag-preview';
43+
import {CDK_DROP_CONTAINER, CdkDropContainer} from './drop-container';
44+
4445

4546
// TODO(crisbeto): add auto-scrolling functionality.
4647
// TODO(crisbeto): add an API for moving a draggable up/down the

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
import {InjectionToken, QueryList} from '@angular/core';
1010
import {CdkDrag} from './drag';
1111

12+
1213
export interface CdkDropContainer<T = any> {
1314
/** Arbitrary data to attach to all events emitted by this container. */
1415
data: T;

src/cdk/drag-drop/drop.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
* found in the LICENSE file at https://angular.io/license
77
*/
88

9+
import {coerceArray} from '@angular/cdk/coercion';
910
import {
1011
ChangeDetectionStrategy,
1112
Component,
@@ -20,12 +21,12 @@ import {
2021
QueryList,
2122
ViewEncapsulation,
2223
} from '@angular/core';
23-
import {coerceArray} from '@angular/cdk/coercion';
2424
import {CdkDrag} from './drag';
25-
import {CdkDragExit, CdkDragEnter, CdkDragDrop} from './drag-events';
26-
import {CDK_DROP_CONTAINER} from './drop-container';
2725
import {DragDropRegistry} from './drag-drop-registry';
26+
import {CdkDragDrop, CdkDragEnter, CdkDragExit} from './drag-events';
2827
import {moveItemInArray} from './drag-utils';
28+
import {CDK_DROP_CONTAINER} from './drop-container';
29+
2930

3031
/** Counter used to generate unique ids for drop zones. */
3132
let _uniqueIdCounter = 0;

0 commit comments

Comments
 (0)