Repository navigation
fix(vue): keep frame interpolation enabled when the prop is omitted #1010
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| '@lottiefiles/dotlottie-vue': patch | ||
| --- | ||
|
|
||
| fix(vue): keep frame interpolation enabled when `useFrameInterpolation` is omitted |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,3 +75,33 @@ describe('DotLottieVue themeData', () => { | |
| }); | ||
| }); | ||
| }); | ||
|
|
||
| describe('DotLottieVue useFrameInterpolation', () => { | ||
| let app: App | undefined; | ||
|
|
||
| afterEach(() => { | ||
| app?.unmount(); | ||
| app = undefined; | ||
| }); | ||
|
|
||
| test('keeps the core default (true) when the prop is omitted', async () => { | ||
| let component: DotLottieVueInstance | null = null; | ||
|
|
||
| app = createApp({ | ||
| render: () => | ||
| h(DotLottieVue, { | ||
| src: lottieSrc, | ||
| ref: (el: unknown) => { | ||
| component = el as DotLottieVueInstance | null; | ||
| }, | ||
| }), | ||
| }); | ||
| app.mount(document.body.appendChild(document.createElement('div'))); | ||
|
|
||
| await vi.waitFor(() => { | ||
| expect(component?.getDotLottieInstance()?.isLoaded).toBe(true); | ||
| }); | ||
|
|
||
| expect(component?.getDotLottieInstance()?.useFrameInterpolation).toBe(true); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the fix! This line is what's breaking Type Check. Can you move |
||
| }); | ||
| }); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tried it locally, works. Can you also update
packages/vue/README.mdline 78? The default column still saysfalse.