Compare commits

..

No commits in common. "6d1279f1ef7ccc1a5a0d993e5dd5bf577699ca89" and "288e3010ab8f5551a0c94e989b949104397734d4" have entirely different histories.

View file

@ -138,7 +138,8 @@ class Editor extends React.Component<IEditorProps> {
}
const mainContainerClone: IContainerModel = structuredClone(current.MainContainer);
const container: ContainerModel | undefined = findContainerById(mainContainerClone, current.SelectedContainer.properties.id);
const it = MakeIterator(mainContainerClone);
const container: ContainerModel | undefined = findContainerById(current.MainContainer, current.SelectedContainer.properties.id);
if (container === null || container === undefined) {
throw new Error('[OnPropertyChange] Container model was not found among children of the main container!');
@ -253,9 +254,7 @@ class Editor extends React.Component<IEditorProps> {
public SaveEditor() {
const exportName = 'state';
const spaces = import.meta.env.DEV ? 4 : 0;
const data = JSON.stringify(this.state, getCircularReplacer(), spaces);
const dataStr = `data:text/json;charset=utf-8,${encodeURIComponent(data)}`;
const dataStr = `data:text/json;charset=utf-8,${encodeURIComponent(JSON.stringify(this.state, getCircularReplacer(), 4))}`;
const downloadAnchorNode = document.createElement('a');
downloadAnchorNode.setAttribute('href', dataStr);
downloadAnchorNode.setAttribute('download', `${exportName}.json`);