Refactor AddContainerToSelectedContainer
This commit is contained in:
parent
d05d0fb196
commit
b1b30e8486
4 changed files with 19 additions and 28 deletions
|
@ -27,21 +27,15 @@ import { SortChildren } from './ContainerOperations';
|
|||
*/
|
||||
export function AddContainerToSelectedContainer(
|
||||
type: string,
|
||||
selected: IContainerModel | undefined,
|
||||
selected: IContainerModel,
|
||||
configuration: IConfiguration,
|
||||
fullHistory: IHistoryState[],
|
||||
historyCurrentStep: number
|
||||
): IHistoryState[] | null {
|
||||
if (selected === null ||
|
||||
selected === undefined) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const parent = selected;
|
||||
): IHistoryState[] {
|
||||
return AddContainer(
|
||||
parent.children.length,
|
||||
selected.children.length,
|
||||
type,
|
||||
parent.properties.id,
|
||||
selected.properties.id,
|
||||
configuration,
|
||||
fullHistory,
|
||||
historyCurrentStep
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue