Skip to content

Commit b31f466

Browse files
Additional feedback for Lottie (#17006)
Additional feedback that was not addressed in the initial lottie PR as it arrives at the time it got merged.
1 parent ad62b61 commit b31f466

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/dev/addons/src/lottie/lottiePlayer.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ export class LottiePlayer {
6767
private _canvas: Nullable<HTMLCanvasElement> = null;
6868
private _resizeObserver: Nullable<ResizeObserver> = null;
6969

70-
private _container: HTMLDivElement;
71-
private _animationFile: string;
72-
private _configuration: Partial<AnimationConfiguration>;
70+
private readonly _container: HTMLDivElement;
71+
private readonly _animationFile: string;
72+
private readonly _configuration: Partial<AnimationConfiguration>;
7373

7474
/**
7575
* Creates a new instance of the LottiePlayer.

packages/dev/addons/src/lottie/worker.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ let AnimationPlayer: Nullable<AnimationController> = null;
88
/**
99
* Default configuration for lottie animations playback.
1010
*/
11-
const DefaultConfiguration: AnimationConfiguration = {
11+
const DefaultConfiguration = {
1212
loopAnimation: false, // By default do not loop animations
1313
spriteAtlasSize: 2048, // Size of the texture atlas
1414
gapSize: 5, // Gap around the sprites in the atlas
@@ -19,7 +19,7 @@ const DefaultConfiguration: AnimationConfiguration = {
1919
easingSteps: 4, // Number of steps to sample easing functions for animations - Less than 4 causes issues with some interpolations
2020
ignoreOpacityAnimations: true, // Whether to ignore opacity animations for performance
2121
supportDeviceLost: false, // Whether to support device lost events for WebGL contexts,
22-
};
22+
} as const satisfies AnimationConfiguration;
2323

2424
onmessage = async function (evt) {
2525
if (evt.data.canvas && evt.data.file) {

0 commit comments

Comments
 (0)