Merged PR 196: Implement Vertical orientation + Upgrade Heroicons to 2.0
Implémenter l'orientation verticale Modifier l'effet de append Implementer RigidBody Implementer Flex et simplex Implémenter Push Implémenter Swap Implement MinMaxHeight without behaviors Fix Margin for Height Implement PositionReference Fix dimension vertical position inside children Add orientation change in form Implement sortChildren Implement Anchor Fix warning message on overlapping Fix minimap when root container is vertical #7287 #7288 #7289 #7290 #7291 #7292 #7294 #7295 #7296 #7297 #7298 #7299 #7300 #7301 #7302
This commit is contained in:
parent
459e83a0c8
commit
18cbacaca1
45 changed files with 2112 additions and 1063 deletions
|
@ -1,4 +1,4 @@
|
|||
import { XPositionReference } from '../Enums/XPositionReference';
|
||||
import { PositionReference } from '../Enums/PositionReference';
|
||||
import { IAvailableContainer } from '../Interfaces/IAvailableContainer';
|
||||
import { IAvailableSymbol } from '../Interfaces/IAvailableSymbol';
|
||||
import { IConfiguration } from '../Interfaces/IConfiguration';
|
||||
|
@ -6,6 +6,7 @@ import { ContainerModel, IContainerModel } from '../Interfaces/IContainerModel';
|
|||
import { IContainerProperties } from '../Interfaces/IContainerProperties';
|
||||
import { IEditorState } from '../Interfaces/IEditorState';
|
||||
import { ISymbolModel } from '../Interfaces/ISymbolModel';
|
||||
import { Orientation } from '../Interfaces/Orientation';
|
||||
|
||||
/// EDITOR DEFAULTS ///
|
||||
|
||||
|
@ -50,7 +51,7 @@ export const DEFAULTCHILDTYPE_MAX_DEPTH = 10;
|
|||
/// DIMENSIONS DEFAULTS ///
|
||||
|
||||
export const SHOW_SELF_DIMENSIONS = true;
|
||||
export const SHOW_CHILDREN_DIMENSIONS = false;
|
||||
export const SHOW_CHILDREN_DIMENSIONS = true;
|
||||
export const SHOW_BORROWER_DIMENSIONS = true;
|
||||
export const SHOW_DIMENSIONS_PER_DEPTH = false;
|
||||
export const DIMENSION_MARGIN = 50;
|
||||
|
@ -173,16 +174,19 @@ export const DEFAULT_MAINCONTAINER_PROPS: IContainerProperties = {
|
|||
parentId: '',
|
||||
linkedSymbolId: '',
|
||||
displayedText: 'main',
|
||||
orientation: Orientation.Horizontal,
|
||||
x: 0,
|
||||
y: 0,
|
||||
margin: {},
|
||||
minWidth: 1,
|
||||
maxWidth: Number.MAX_SAFE_INTEGER,
|
||||
minHeight: 1,
|
||||
maxHeight: Number.MAX_SAFE_INTEGER,
|
||||
width: Number(DEFAULT_CONFIG.MainContainer.Width),
|
||||
height: Number(DEFAULT_CONFIG.MainContainer.Height),
|
||||
isAnchor: false,
|
||||
isFlex: false,
|
||||
xPositionReference: XPositionReference.Left,
|
||||
positionReference: PositionReference.TopLeft,
|
||||
hideChildrenInTreeview: false,
|
||||
showChildrenDimensions: true, // TODO: put the dimension at the top (see pdf)
|
||||
showSelfDimensions: true, // TODO: put the dimension at the bottom (see pdf)
|
||||
|
@ -213,22 +217,28 @@ export function GetDefaultContainerProps(type: string,
|
|||
width: number,
|
||||
height: number,
|
||||
containerConfig: IAvailableContainer): IContainerProperties {
|
||||
const orientation = containerConfig.Orientation ?? Orientation.Horizontal;
|
||||
const defaultIsFlex = (orientation === Orientation.Vertical && containerConfig.Height === undefined) ||
|
||||
(orientation === Orientation.Horizontal && containerConfig.Width === undefined);
|
||||
return ({
|
||||
id: `${type}-${typeCount}`,
|
||||
type,
|
||||
parentId: parent?.properties.id ?? '',
|
||||
linkedSymbolId: '',
|
||||
displayedText: `${containerConfig.DisplayedText ?? type}-${typeCount}`,
|
||||
orientation,
|
||||
x,
|
||||
y,
|
||||
margin: containerConfig.Margin ?? {},
|
||||
width,
|
||||
height,
|
||||
isAnchor: containerConfig.IsAnchor ?? false,
|
||||
isFlex: containerConfig.IsFlex ?? containerConfig.Width === undefined,
|
||||
xPositionReference: containerConfig.XPositionReference ?? XPositionReference.Left,
|
||||
isFlex: containerConfig.IsFlex ?? defaultIsFlex,
|
||||
positionReference: containerConfig.PositionReference ?? PositionReference.TopLeft,
|
||||
minWidth: containerConfig.MinWidth ?? 1,
|
||||
maxWidth: containerConfig.MaxWidth ?? Number.MAX_SAFE_INTEGER,
|
||||
minHeight: containerConfig.MinWidth ?? 1,
|
||||
maxHeight: containerConfig.MaxWidth ?? Number.MAX_SAFE_INTEGER,
|
||||
hideChildrenInTreeview: containerConfig.HideChildrenInTreeview ?? false,
|
||||
showChildrenDimensions: containerConfig.ShowChildrenDimensions ?? false,
|
||||
showSelfDimensions: containerConfig.ShowSelfDimensions ?? false,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue