From c5c9d47c881ade12e989afe976060dc5acbae81e Mon Sep 17 00:00:00 2001 From: andev0 Date: Wed, 21 Aug 2024 10:17:18 +0200 Subject: [PATCH] Minor refactoring of resource cloning --- src/Sankey/SlotsGroup.ts | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Sankey/SlotsGroup.ts b/src/Sankey/SlotsGroup.ts index 91f5935..e1c2d21 100644 --- a/src/Sankey/SlotsGroup.ts +++ b/src/Sankey/SlotsGroup.ts @@ -127,17 +127,11 @@ export class SlotsGroup extends EventTarget { if (this.type === "input") { - return new SankeySlotMissing(this, this.groupSvg, { - id: this.resource.id, - amount: this.resource.amount - }); + return new SankeySlotMissing(this, this.groupSvg, { ...this.resource }); } else if (this.type === "output") { - return new SankeySlotExceeding(this, this.groupSvg, { - id: this.resource.id, - amount: this.resource.amount - }); + return new SankeySlotExceeding(this, this.groupSvg, { ...this.resource }); } else {