diff --git a/packages/x6/src/model/animation.ts b/packages/x6/src/model/animation.ts index c64beb43bee..e4f8771d1d9 100644 --- a/packages/x6/src/model/animation.ts +++ b/packages/x6/src/model/animation.ts @@ -75,7 +75,7 @@ export class Animation { options.start && options.start(this.getArgs(key)) }, options.delay) - return this.stop.bind(this, path, delim, options) + return this.stop.bind(this, path, options,delim) } stop( diff --git a/packages/x6/src/renderer/queueJob.ts b/packages/x6/src/renderer/queueJob.ts index 0a6690f00a7..b2b5d3ddcc1 100644 --- a/packages/x6/src/renderer/queueJob.ts +++ b/packages/x6/src/renderer/queueJob.ts @@ -12,7 +12,8 @@ export class JobQueue { } else { const index = this.findInsertionIndex(job) if (index >= 0) { - 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); } } }