Implement minWidth property + refactor default property of new containers and main container (#34)
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
Co-authored-by: Eric NGUYEN <enguyen@techform.fr> Reviewed-on: https://git.siklos-chaneru.duckdns.org/Siklos/svg-layout-designer-react/pulls/34
This commit is contained in:
parent
60329ef143
commit
2945febd91
12 changed files with 137 additions and 44 deletions
|
@ -5,6 +5,7 @@ import { fetchConfiguration } from '../API/api';
|
|||
import { IEditorState } from '../../Interfaces/IEditorState';
|
||||
import { LoadState } from './Load';
|
||||
import { XPositionReference } from '../../Enums/XPositionReference';
|
||||
import { DEFAULT_MAINCONTAINER_PROPS } from '../../utils/default';
|
||||
|
||||
export function NewEditor(
|
||||
setEditorState: Dispatch<SetStateAction<IEditorState>>,
|
||||
|
@ -17,19 +18,9 @@ export function NewEditor(
|
|||
const MainContainer = new ContainerModel(
|
||||
null,
|
||||
{
|
||||
id: 'main',
|
||||
parentId: 'null',
|
||||
x: 0,
|
||||
y: 0,
|
||||
...DEFAULT_MAINCONTAINER_PROPS,
|
||||
width: Number(configuration.MainContainer.Width),
|
||||
height: Number(configuration.MainContainer.Height),
|
||||
isRigidBody: false,
|
||||
isAnchor: false,
|
||||
XPositionReference: XPositionReference.Left,
|
||||
style: {
|
||||
fillOpacity: 0,
|
||||
stroke: 'black'
|
||||
}
|
||||
height: Number(configuration.MainContainer.Height)
|
||||
}
|
||||
);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue