From 4c01a6138739f080015ebe8b8992ead2c74aed14 Mon Sep 17 00:00:00 2001 From: Daniel Huber <30466471+daniel0611@users.noreply.github.com> Date: Sun, 28 Jan 2024 08:57:33 +0100 Subject: [PATCH] Remove unused variable in auto layouting command --- src/features/autoLayout/command.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/features/autoLayout/command.ts b/src/features/autoLayout/command.ts index 8c65c17..c9f32b7 100644 --- a/src/features/autoLayout/command.ts +++ b/src/features/autoLayout/command.ts @@ -1,5 +1,5 @@ import { inject } from "inversify"; -import { Command, CommandExecutionContext, LocalModelSource, SModelRootImpl, TYPES } from "sprotty"; +import { Command, CommandExecutionContext, SModelRootImpl, TYPES } from "sprotty"; import { Action, IModelLayoutEngine, SGraph, SModelRoot } from "sprotty-protocol"; import { LoadDiagramCommand } from "../serialize/load"; @@ -22,16 +22,13 @@ export class LayoutModelCommand extends Command { @inject(TYPES.IModelLayoutEngine) private readonly layoutEngine?: IModelLayoutEngine; - @inject(TYPES.ModelSource) - private readonly modelSource?: LocalModelSource; - private oldModelSchema?: SModelRoot; private newModel?: SModelRootImpl; async execute(context: CommandExecutionContext): Promise { this.oldModelSchema = context.modelFactory.createSchema(context.root); - if (!this.layoutEngine || !this.modelSource) throw new Error("Missing injects"); + if (!this.layoutEngine) throw new Error("Missing injects"); // Layouting is normally done on the graph schema. // This is not viable for us because the dfd nodes have a dynamically computed size.