Skip to content

Commit 4a1a68d

Browse files
devversionkara
authored andcommitted
fix(ripple): remove unused ScrollDispatchModule (#7528)
1 parent ff52d95 commit 4a1a68d

File tree

2 files changed

+2
-13
lines changed

2 files changed

+2
-13
lines changed

src/lib/core/ripple/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
*/
88

99
import {NgModule} from '@angular/core';
10-
import {ScrollDispatchModule} from '@angular/cdk/scrolling';
1110
import {PlatformModule} from '@angular/cdk/platform';
1211
import {MatCommonModule} from '../common-behaviors/common-module';
1312
import {MatRipple} from './ripple';
@@ -17,7 +16,7 @@ export {RippleRef, RippleState} from './ripple-ref';
1716
export {RippleConfig, RIPPLE_FADE_IN_DURATION, RIPPLE_FADE_OUT_DURATION} from './ripple-renderer';
1817

1918
@NgModule({
20-
imports: [MatCommonModule, PlatformModule, ScrollDispatchModule],
19+
imports: [MatCommonModule, PlatformModule],
2120
exports: [MatRipple, MatCommonModule],
2221
declarations: [MatRipple],
2322
})

src/lib/core/ripple/ripple.spec.ts

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {TestBed, ComponentFixture, fakeAsync, tick, inject} from '@angular/core/testing';
22
import {Component, ViewChild} from '@angular/core';
33
import {Platform} from '@angular/cdk/platform';
4-
import {ViewportRuler, VIEWPORT_RULER_PROVIDER} from '@angular/cdk/scrolling';
54
import {dispatchMouseEvent, dispatchTouchEvent} from '@angular/cdk/testing';
65
import {RIPPLE_FADE_OUT_DURATION, RIPPLE_FADE_IN_DURATION} from './ripple-renderer';
76
import {
@@ -13,7 +12,6 @@ describe('MatRipple', () => {
1312
let fixture: ComponentFixture<any>;
1413
let rippleTarget: HTMLElement;
1514
let originalBodyMargin: string | null;
16-
let viewportRuler: ViewportRuler;
1715
let platform: Platform;
1816

1917
/** Extracts the numeric value of a pixel size string like '123px'. */
@@ -24,7 +22,6 @@ describe('MatRipple', () => {
2422
beforeEach(() => {
2523
TestBed.configureTestingModule({
2624
imports: [MatRippleModule],
27-
providers: [VIEWPORT_RULER_PROVIDER],
2825
declarations: [
2926
BasicRippleContainer,
3027
RippleContainerWithInputBindings,
@@ -34,8 +31,7 @@ describe('MatRipple', () => {
3431
});
3532
});
3633

37-
beforeEach(inject([ViewportRuler, Platform], (ruler: ViewportRuler, p: Platform) => {
38-
viewportRuler = ruler;
34+
beforeEach(inject([Platform], (p: Platform) => {
3935
platform = p;
4036

4137
// Set body margin to 0 during tests so it doesn't mess up position calculations.
@@ -239,9 +235,6 @@ describe('MatRipple', () => {
239235

240236
// Mobile safari
241237
window.scrollTo(pageScrollLeft, pageScrollTop);
242-
// Force an update of the cached viewport geometries because IE11 emits the
243-
// scroll event later.
244-
viewportRuler._cacheViewportGeometry();
245238
});
246239

247240
afterEach(() => {
@@ -255,9 +248,6 @@ describe('MatRipple', () => {
255248

256249
// Mobile safari
257250
window.scrollTo(0, 0);
258-
// Force an update of the cached viewport geometries because IE11 emits the
259-
// scroll event later.
260-
viewportRuler._cacheViewportGeometry();
261251
});
262252

263253
it('create ripple with correct position', () => {

0 commit comments

Comments
 (0)