Merged PR 16: Transform every single class components into functional component
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing

This improve greatly the performance and the code cleaning.
It allows us to separate the inseparable class methods into modules functions
This commit is contained in:
Eric Nguyen 2022-08-09 15:15:56 +00:00
parent 1fc11adbaa
commit d9e06537e8
33 changed files with 1298 additions and 1261 deletions

37
src/utils/default.ts Normal file
View file

@ -0,0 +1,37 @@
import { Configuration } from '../Interfaces/Configuration';
import Properties from '../Interfaces/Properties';
export const DEFAULT_CONFIG: Configuration = {
AvailableContainers: [
{
Type: 'Container',
Width: 75,
Height: 100,
Style: {
fillOpacity: 0,
stroke: 'green'
}
}
],
AvailableSymbols: [],
MainContainer: {
Type: 'Container',
Width: 2000,
Height: 100,
Style: {
fillOpacity: 0,
stroke: 'black'
}
}
};
export const DEFAULT_MAINCONTAINER_PROPS: Properties = {
id: 'main',
parentId: 'null',
x: 0,
y: 0,
width: DEFAULT_CONFIG.MainContainer.Width,
height: DEFAULT_CONFIG.MainContainer.Height,
fillOpacity: 0,
stroke: 'black'
};