Fix eslint errors
This commit is contained in:
parent
5b3ab651e6
commit
4e41fda93a
87 changed files with 1003 additions and 702 deletions
|
@ -14,7 +14,9 @@ import { type IDimensionStyle } from '../Components/SVG/Elements/Dimension';
|
|||
/// EDITOR DEFAULTS ///
|
||||
|
||||
/** Enable fast boot and disable main menu (0 = disabled, 1 = loading, 2 = loaded) */
|
||||
export const FAST_BOOT = import.meta.env.PROD ? AppState.Loaded : AppState.MainMenu;
|
||||
export const FAST_BOOT = import.meta.env.PROD
|
||||
? AppState.Loaded
|
||||
: AppState.MainMenu;
|
||||
|
||||
/** Disable any call to the API (default = false) */
|
||||
export const DISABLE_API = false;
|
||||
|
@ -89,7 +91,9 @@ export function GetDefaultEditorState(configuration: IConfiguration): IEditorSta
|
|||
throw new Error('Cannot initialize project! Main container has an undefined size');
|
||||
}
|
||||
|
||||
const containerConfig = configuration.AvailableContainers.find(config => config.Type === configuration.MainContainer.Type);
|
||||
const containerConfig = configuration.AvailableContainers.find(
|
||||
config => config.Type === configuration.MainContainer.Type
|
||||
);
|
||||
|
||||
let mainContainerConfig: IContainerProperties;
|
||||
if (containerConfig !== undefined) {
|
||||
|
@ -128,9 +132,7 @@ export function GetDefaultEditorState(configuration: IConfiguration): IEditorSta
|
|||
configuration.MainContainer
|
||||
);
|
||||
}
|
||||
const mainContainer = new ContainerModel(
|
||||
mainContainerConfig
|
||||
);
|
||||
const mainContainer = new ContainerModel(mainContainerConfig);
|
||||
const containers = new Map<string, IContainerModel>();
|
||||
containers.set(mainContainer.properties.id, mainContainer);
|
||||
|
||||
|
@ -244,14 +246,16 @@ export const DEFAULT_MAINCONTAINER_PROPS: IContainerProperties = {
|
|||
* @param containerConfig default config of the container sent by the API
|
||||
* @returns {IContainerProperties} Default properties of a newly created container
|
||||
*/
|
||||
export function GetDefaultContainerProps(type: string,
|
||||
export function GetDefaultContainerProps(
|
||||
type: string,
|
||||
typeCount: number,
|
||||
parent: IContainerModel | undefined | null,
|
||||
x: number,
|
||||
y: number,
|
||||
width: number,
|
||||
height: number,
|
||||
containerConfig: IAvailableContainer): IContainerProperties {
|
||||
containerConfig: IAvailableContainer
|
||||
): IContainerProperties {
|
||||
const orientation = containerConfig.Orientation ?? Orientation.Horizontal;
|
||||
return ({
|
||||
id: `${type}-${typeCount}`,
|
||||
|
@ -299,10 +303,12 @@ export function GetDefaultContainerProps(type: string,
|
|||
});
|
||||
}
|
||||
|
||||
export function GetDefaultSymbolModel(name: string,
|
||||
export function GetDefaultSymbolModel(
|
||||
name: string,
|
||||
newCounters: Record<string, number>,
|
||||
type: string,
|
||||
symbolConfig: IAvailableSymbol): ISymbolModel {
|
||||
symbolConfig: IAvailableSymbol
|
||||
): ISymbolModel {
|
||||
const id = `${name}-${newCounters[type]}`;
|
||||
return {
|
||||
id,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue