Merged PR 17: Implement rigid body Fix multiple bugs
Implement rigid body Fix saveload bug: having null elements Fix events being duplicated and not being removed
This commit is contained in:
parent
d2e1d9f0a4
commit
616fe3e9ac
22 changed files with 804 additions and 95 deletions
|
@ -8,6 +8,11 @@ import { IEditorState } from '../Components/Editor/Editor';
|
|||
*/
|
||||
export function Revive(editorState: IEditorState): void {
|
||||
const history = editorState.history;
|
||||
|
||||
// restore last step
|
||||
editorState.historyCurrentStep = history.length - 1;
|
||||
|
||||
// restore the parents and the selected container
|
||||
for (const state of history) {
|
||||
if (state.MainContainer === null || state.MainContainer === undefined) {
|
||||
continue;
|
||||
|
@ -43,6 +48,10 @@ export const getCircularReplacer = (): (key: any, value: object | null) => objec
|
|||
return;
|
||||
}
|
||||
|
||||
if (key === 'SelectedContainer') {
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeof value === 'object' && value !== null) {
|
||||
if (seen.has(value)) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue