Merged PR 226: Implement associated container and default X, Y position for Symbol

Implement associated container and default X, Y position for Symbol

Related work items: #7537, #7540
This commit is contained in:
Eric Nguyen 2022-11-07 08:59:25 +00:00
parent 0a664752e9
commit 4ff2e0b7fb
9 changed files with 136 additions and 48 deletions

View file

@ -203,20 +203,21 @@ function HandleSetContainerList(
const containers = current.containers;
switch (addingBehavior) {
case AddMethod.Insert:
case AddMethod.Append:
case AddMethod.Append: {
response.Containers.forEach(config => {
config.AddMethod = config.AddMethod ?? addingBehavior;
});
setNewHistory(
AddContainers(
selectedContainer.children.length,
response.Containers,
selectedContainer.properties.id,
configuration,
history,
historyCurrentStep
));
const { history: newHistory } = AddContainers(
selectedContainer.children.length,
response.Containers,
selectedContainer.properties.id,
configuration,
history,
historyCurrentStep);
setNewHistory(newHistory);
break;
}
case AddMethod.Replace:
setNewHistory(
HandleReplace(
@ -275,7 +276,7 @@ function HandleReplace(
historyCurrentStep
);
const newHistoryBeforeDelete = AddContainers(
const { history: newHistoryBeforeDelete } = AddContainers(
index,
response.Containers,
selectedContainer.properties.parentId,
@ -318,7 +319,7 @@ function HandleInsert(
historyCurrentStep
);
const newHistoryBeforeDelete = AddContainers(
const { history: newHistoryBeforeDelete } = AddContainers(
index,
response.Containers,
selectedContainer.properties.parentId,