Skip to content

Commit a5b8fc8

Browse files
committed
refactor: remove NativeScriptAnimationEngine
1 parent e7ab3c5 commit a5b8fc8

File tree

2 files changed

+6
-26
lines changed

2 files changed

+6
-26
lines changed

Diff for: nativescript-angular/animations/animation-engine.ts

-20
This file was deleted.

Diff for: nativescript-angular/animations/animations.module.ts

+6-6
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,17 @@ import {
66
AnimationDriver,
77
ɵAnimationStyleNormalizer as AnimationStyleNormalizer,
88
ɵWebAnimationsStyleNormalizer as WebAnimationsStyleNormalizer,
9+
ɵAnimationEngine as AnimationEngine,
910
} from "@angular/animations/browser";
1011

1112
import {
1213
ɵAnimationRendererFactory as AnimationRendererFactory,
1314
ɵBrowserAnimationBuilder as BrowserAnimationBuilder,
1415
} from "@angular/platform-browser/animations";
1516

16-
import { NativeScriptAnimationEngine } from "./animation-engine";
17-
import { NativeScriptAnimationDriver } from "./animation-driver";
1817
import { NativeScriptModule } from "../nativescript.module";
1918
import { NativeScriptRendererFactory } from "../renderer";
19+
import { NativeScriptAnimationDriver } from "./animation-driver";
2020

2121
(<any>global).document = {
2222
body: {
@@ -25,7 +25,7 @@ import { NativeScriptRendererFactory } from "../renderer";
2525
};
2626

2727
@Injectable()
28-
export class InjectableAnimationEngine extends NativeScriptAnimationEngine {
28+
export class InjectableAnimationEngine extends AnimationEngine {
2929
constructor(driver: AnimationDriver, normalizer: AnimationStyleNormalizer) {
3030
super(driver, normalizer);
3131
}
@@ -36,7 +36,7 @@ export function instantiateSupportedAnimationDriver() {
3636
}
3737

3838
export function instantiateRendererFactory(
39-
renderer: NativeScriptRendererFactory, engine: NativeScriptAnimationEngine, zone: NgZone) {
39+
renderer: NativeScriptRendererFactory, engine: AnimationEngine, zone: NgZone) {
4040
return new AnimationRendererFactory(renderer, engine, zone);
4141
}
4242

@@ -48,11 +48,11 @@ export const NATIVESCRIPT_ANIMATIONS_PROVIDERS: Provider[] = [
4848
{provide: AnimationBuilder, useClass: BrowserAnimationBuilder},
4949
{provide: AnimationDriver, useFactory: instantiateSupportedAnimationDriver},
5050
{provide: AnimationStyleNormalizer, useFactory: instantiateDefaultStyleNormalizer},
51-
{provide: NativeScriptAnimationEngine, useClass: InjectableAnimationEngine},
51+
{provide: AnimationEngine, useClass: InjectableAnimationEngine},
5252
{
5353
provide: RendererFactory2,
5454
useFactory: instantiateRendererFactory,
55-
deps: [NativeScriptRendererFactory, NativeScriptAnimationEngine, NgZone]
55+
deps: [NativeScriptRendererFactory, AnimationEngine, NgZone]
5656
}
5757
];
5858

0 commit comments

Comments
 (0)