Final fix for XPositionReference : We are now lying to the user in the form. The transformation is applied to the value that is shown but the transformation is restored for the computing afterward #33

Merged
Siklos merged 4 commits from dev.fixtransform into dev 2022-08-16 10:56:58 -04:00
Showing only changes of commit 0fcc2244bb - Show all commits

View file

@ -7,7 +7,6 @@ import { getCurrentHistory } from './Editor';
import IProperties from '../../Interfaces/IProperties';
import { AddMethod } from '../../Enums/AddMethod';
import { IAvailableContainer } from '../../Interfaces/IAvailableContainer';
import { transformX } from '../SVG/Elements/Container';
import { XPositionReference } from '../../Enums/XPositionReference';
/**
@ -58,7 +57,7 @@ export function DeleteContainer(
setHistoryCurrentStep: Dispatch<SetStateAction<number>>
): void {
const history = getCurrentHistory(fullHistory, historyCurrentStep);
const current = history[historyCurrentStep];
const current = history[history.length - 1];
const mainContainerClone: IContainerModel = structuredClone(current.MainContainer);
const container = findContainerById(mainContainerClone, containerId);