We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7f822f0 commit 5aebbbdCopy full SHA for 5aebbbd
src/attack_flow_builder/src/assets/scripts/OpenChart/DiagramEditor/Commands/ViewEditor/index.ts
@@ -137,10 +137,7 @@ export function spawnObject(
137
export function spawnObjectAtInterfaceCenter(
138
editor: DiagramViewEditor, id: string
139
): GroupCommand {
140
- const ui = editor.interface;
141
- const camera = editor.file.camera;
142
- const x = ((ui.width / 2) - camera.x) / camera.k;
143
- const y = ((ui.height / 2) - camera.y) / camera.k;
+ const { x, y } = editor.file.camera;
144
return spawnObject(editor, id, x, y);
145
}
146
0 commit comments