Skip to content
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

更改动画占用内存,持续不放的问题 #4357

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/x6/src/model/animation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ export class Animation {
options.start && options.start(this.getArgs<T>(key))
}, options.delay)

return this.stop.bind(this, path, delim, options)
return this.stop.bind(this, path, options,delim)
}

stop<T extends Animation.TargetValue>(
Expand Down
3 changes: 2 additions & 1 deletion packages/x6/src/renderer/queueJob.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export class JobQueue {
} else {
const index = this.findInsertionIndex(job)
if (index >= 0) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里为什么要重复判断呀?index > 0 已经说明这个 job 存在呀。

this.queue.splice(index, 0, job)
const itemIndex = this.queue.findIndex((item) => item.id === job.id);
this.queue.splice(itemIndex !== -1 ? itemIndex : index, itemIndex !== -1 ? 1 : 0, job);
}
}
}
Expand Down
Loading