Skip to content

Commit a5abca7

Browse files
wang1212Alexzjtgithub-actions[bot]
authored
Release (#1942)
* perf: discard animation when target is destroyed (#1940) Co-authored-by: huiyu.zjt <huiyu.zjt@antgroup.com> * chore: add changeset * chore(release): bump version (#1941) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --------- Co-authored-by: huiyu.zjt <Alexzjt@users.noreply.github.com> Co-authored-by: huiyu.zjt <huiyu.zjt@antgroup.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 46ca3d9 commit a5abca7

7 files changed

Lines changed: 27 additions & 3 deletions

File tree

packages/g-web-animations-api/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @antv/g-web-animations-api
22

3+
## 2.1.25
4+
5+
### Patch Changes
6+
7+
- d4686e6: fix: discard animation when target is destroyed
8+
39
## 2.1.24
410

511
### Patch Changes

packages/g-web-animations-api/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g-web-animations-api",
3-
"version": "2.1.24",
3+
"version": "2.1.25",
44
"description": "A simple implementation of Web Animations API.",
55
"keywords": [
66
"antv",

packages/g-web-animations-api/src/dom/Animation.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,11 @@ export class Animation implements IAnimation {
261261
* resolve/reject ready/finished Promise according to current state
262262
*/
263263
updatePromises() {
264+
if (this.effect.target?.destroyed) {
265+
this.readyPromise = undefined;
266+
this.finishedPromise = undefined;
267+
return false;
268+
}
264269
const { oldPlayState } = this;
265270
const newPlayState = this.pending ? 'pending' : this.playState;
266271
if (this.readyPromise && newPlayState !== oldPlayState) {

packages/g/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @antv/g
22

3+
## 6.1.25
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [d4686e6]
8+
- @antv/g-web-animations-api@2.1.25
9+
310
## 6.1.24
411

512
### Patch Changes

packages/g/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/g",
3-
"version": "6.1.24",
3+
"version": "6.1.25",
44
"description": "A core module for rendering engine implements DOM API.",
55
"keywords": [
66
"antv",

packages/react-g/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @antv/react-g
22

3+
## 2.0.41
4+
5+
### Patch Changes
6+
7+
- @antv/g@6.1.25
8+
39
## 2.0.40
410

511
### Patch Changes

packages/react-g/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@antv/react-g",
3-
"version": "2.0.40",
3+
"version": "2.0.41",
44
"description": "react render for @antv/g",
55
"keywords": [
66
"react",

0 commit comments

Comments
 (0)