Move MainMenu Loading to App + Change is/setLoaded to appState/setAppState

This commit is contained in:
Eric NGUYEN 2022-10-18 16:51:44 +02:00
parent b44c6fb477
commit eaf03824fb
10 changed files with 1149 additions and 1138 deletions

View file

@ -161,14 +161,14 @@
/**
* Hide the main menu to go to the application.
* SetEditor must be called first or the application will crash.
* @param isLoaded
* @param appState
* @param callback
*/
public SetLoaded(isLoaded: boolean, callback?: (state: IEditorState) => void) {
const eventType = 'setLoaded';
public SetAppState(appState: SVGLD.AppState, callback?: (state: IEditorState) => void) {
const eventType = 'setAppState';
this.app.AddEventListener(eventType, callback);
const component = this.GetAppComponent();
component.dispatchEvent(new CustomEvent(eventType, { detail: isLoaded }))
component.dispatchEvent(new CustomEvent(eventType, { detail: appState }))
}
/**

1054
public/svgld.d.ts vendored

File diff suppressed because it is too large Load diff