-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: adjust animation logic (#5751)
* refactor(transforms): transforms support receive draw context * refactor(elements): edge update key when onframe * refactor(elements): node/combo update key when onframe, adjust childrenNode type * refactor(animation): adjust animation type definition * feat(utils): add themeOf util * feat(utils): add getElementAnimationOptions animationOf, remove unused utils * refactor(runtime): extract animation logic into controller * refactor(runtime): adapt new animation types * refactor(animations): adjust animation executor * refactor: adpat draw method * chore: adjust toMatchSVGSnapshot * refactor: adjust animations * test: update test case and snapshots
- Loading branch information
Showing
40 changed files
with
727 additions
and
563 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { register } from '@/src/registry'; | ||
import { themeOf } from '@/src/utils/theme'; | ||
|
||
describe('theme', () => { | ||
it('themeOf', () => { | ||
expect(themeOf({})).toEqual({}); | ||
expect(themeOf({ theme: 'null' })).toEqual({}); | ||
|
||
const theme = { node: {} }; | ||
register('theme', 'light', theme); | ||
|
||
expect(themeOf({ theme: 'light' })).toBe(theme); | ||
}); | ||
}); |
Oops, something went wrong.