From 1d75a1edff59227bd45dc7d1a4c9a740ee2070f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=BD=AD=E6=B6=9B?= Date: Mon, 8 Jul 2024 14:14:59 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=94=B9=E5=8D=A0=E7=94=A8=E5=86=85?= =?UTF-8?q?=E5=AD=98=E4=B8=8D=E9=87=8A=E6=94=BE=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=8C=E5=8F=8A=E5=8F=82=E6=95=B0=E4=BC=A0=E9=80=92=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/x6/src/model/animation.ts | 2 +- packages/x6/src/renderer/queueJob.ts | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) 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); } } }