Merged PR 179: Fix bugs about flex and context menu (see desc) + disable hard rigid behavior + add missing properties to form + Clean up css
- Clean up some css class - Fix wrong order when applying flex - Fix Replace behavior not working because previous container was still existing - Disable hard rigid behavior which disallow two container to overlap - Add ENABLE_FLEX, ENABLE_HARD_RIGID ENABLE_SWAP - Add missing form properties with dimensions - Update readme
This commit is contained in:
parent
353f461f4b
commit
443a15e150
16 changed files with 158 additions and 45 deletions
|
@ -105,27 +105,30 @@ function HandleReplace(
|
|||
const index = selectedContainer.parent.children.indexOf(selectedContainer);
|
||||
|
||||
const types = response.Containers.map(container => container.Type);
|
||||
const newHistoryBeforeDelete = AddContainers(
|
||||
index + 1,
|
||||
types,
|
||||
selectedContainer.properties.parentId,
|
||||
configuration,
|
||||
|
||||
const newHistoryAfterDelete = DeleteContainer(
|
||||
selectedContainer.properties.id,
|
||||
history,
|
||||
historyCurrentStep
|
||||
);
|
||||
|
||||
const newHistoryAfterDelete = DeleteContainer(
|
||||
selectedContainer.properties.id,
|
||||
newHistoryBeforeDelete,
|
||||
newHistoryBeforeDelete.length - 1
|
||||
const newHistoryBeforeDelete = AddContainers(
|
||||
index,
|
||||
types,
|
||||
selectedContainer.properties.parentId,
|
||||
configuration,
|
||||
newHistoryAfterDelete,
|
||||
newHistoryAfterDelete.length - 1
|
||||
);
|
||||
|
||||
// Remove AddContainers from history
|
||||
newHistoryAfterDelete.splice(newHistoryAfterDelete.length - 2, 1);
|
||||
if (import.meta.env.PROD) {
|
||||
newHistoryBeforeDelete.splice(newHistoryBeforeDelete.length - 2, 1);
|
||||
}
|
||||
|
||||
// Rename the last action by Replace
|
||||
newHistoryAfterDelete[newHistoryAfterDelete.length - 1].lastAction =
|
||||
newHistoryBeforeDelete[newHistoryBeforeDelete.length - 1].lastAction =
|
||||
`Replace ${selectedContainer.properties.id} by [${types.join(', ')}]`;
|
||||
|
||||
return newHistoryAfterDelete;
|
||||
return newHistoryBeforeDelete;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue