Move dimension options in Dimensions class

This commit is contained in:
Eric NGUYEN 2022-11-09 16:00:24 +01:00
parent 96c3fbdf4e
commit 3d6d979389
11 changed files with 112 additions and 77 deletions

View file

@ -1,9 +1,9 @@
import { PositionReference } from '../Enums/PositionReference';
import { IMargin } from './IMargin';
import { Orientation } from '../Enums/Orientation';
import { Position } from '../Enums/Position';
import { IKeyValue } from './IKeyValue';
import { IStyle } from './IStyle';
import { IDimensions } from './IDimensions';
/**
* Properties of a container
@ -78,24 +78,8 @@ export interface IContainerProperties {
/** Hide the children in the treeview */
hideChildrenInTreeview: boolean
// TODO: Refactor showSelf., showChildren., markPosition, showDimensionWithMarks in IDimensionOptions interface
/** if true, show the dimension of the container */
showSelfDimensions: Position[]
/** if true show the overall dimensions of its children */
showChildrenDimensions: Position[]
/**
* if true, allows a parent dimension borrower to borrow its x coordinate
* as a reference point for a dimension
*/
markPosition: Orientation[]
/**
* if true, show a dimension from the edge of the container to end
* and insert dimensions marks at lift up children (see liftDimensionToBorrower)
*/
showDimensionWithMarks: Position[]
/** Dimensions options */
dimensionOptions: IDimensions
/**
* Warnings of a container

View file

@ -0,0 +1,23 @@
import { Orientation } from '../Enums/Orientation';
import { Position } from '../Enums/Position';
export interface IDimensions {
// TODO: Refactor showSelf., showChildren., markPosition, showDimensionWithMarks in IDimensionOptions interface
/** if true, show the dimension of the container */
showSelfDimensions: Position[]
/** if true show the overall dimensions of its children */
showChildrenDimensions: Position[]
/**
* if true, allows a parent dimension borrower to borrow its x coordinate
* as a reference point for a dimension
*/
markPosition: Orientation[]
/**
* if true, show a dimension from the edge of the container to end
* and insert dimensions marks at lift up children (see liftDimensionToBorrower)
*/
showDimensionWithMarks: Position[]
}